Skip to content

Commit 9c9a205

Browse files
Update vendored DuckDB sources to 7f992e5a96
1 parent 8497e5f commit 9c9a205

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/duckdb/src/function/table/version/pragma_version.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
@@ -8,10 +8,10 @@
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"

src/duckdb/src/optimizer/topn_window_elimination.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)