File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#ifndef DUCKDB_PATCH_VERSION
2- #define DUCKDB_PATCH_VERSION " 0-dev7404 "
2+ #define DUCKDB_PATCH_VERSION " 0-dev7408 "
33#endif
44#ifndef DUCKDB_MINOR_VERSION
55#define DUCKDB_MINOR_VERSION 5
88#define DUCKDB_MAJOR_VERSION 1
99#endif
1010#ifndef DUCKDB_VERSION
11- #define DUCKDB_VERSION " v1.5.0-dev7404 "
11+ #define DUCKDB_VERSION " v1.5.0-dev7408 "
1212#endif
1313#ifndef DUCKDB_SOURCE_ID
14- #define DUCKDB_SOURCE_ID " 8b06a9a854 "
14+ #define DUCKDB_SOURCE_ID " 7f992e5a96 "
1515#endif
1616#include " duckdb/function/table/system_functions.hpp"
1717#include " duckdb/main/database.hpp"
Original file line number Diff line number Diff line change @@ -550,9 +550,15 @@ bool TopNWindowElimination::CanOptimize(LogicalOperator &op) {
550550 if (window.window_index != filter_col_idx) {
551551 return false ;
552552 }
553+ const auto &first_window_expr = window.expressions [0 ]->Cast <BoundWindowExpression>();
554+ for (auto &partition : first_window_expr.partitions ) {
555+ if (partition->GetExpressionClass () != ExpressionClass::BOUND_COLUMN_REF) {
556+ return false ;
557+ }
558+ }
553559 if (window.expressions .size () != 1 ) {
554560 for (idx_t i = 1 ; i < window.expressions .size (); ++i) {
555- if (!window.expressions [i]->Equals (*window. expressions [ 0 ] )) {
561+ if (!window.expressions [i]->Equals (first_window_expr )) {
556562 return false ;
557563 }
558564 }
You can’t perform that action at this time.
0 commit comments