Skip to content

Commit 30cedca

Browse files
committed
vendor: Update vendored sources to duckdb/duckdb@9eb5eb8
[Fix] duplicate filters during index scans (duckdb/duckdb#17547)
1 parent c48a46a commit 30cedca

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/duckdb/src/function/table/table_scan.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,18 @@ unique_ptr<GlobalTableFunctionState> DuckIndexScanInitGlobal(ClientContext &cont
344344
unsafe_vector<row_t> &row_ids) {
345345
auto g_state = make_uniq<DuckIndexScanState>(context, input.bind_data.get());
346346
if (!row_ids.empty()) {
347+
// Duplicate-eliminate row IDs.
348+
unordered_set<row_t> row_id_set;
349+
auto it = row_ids.begin();
350+
while (it != row_ids.end()) {
351+
if (row_id_set.find(*it) == row_id_set.end()) {
352+
row_id_set.insert(*it++);
353+
continue;
354+
}
355+
// Found a duplicate.
356+
it = row_ids.erase(it);
357+
}
358+
347359
std::sort(row_ids.begin(), row_ids.end());
348360
g_state->row_ids = std::move(row_ids);
349361
}

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-dev3647"
2+
#define DUCKDB_PATCH_VERSION "0-dev3649"
33
#endif
44
#ifndef DUCKDB_MINOR_VERSION
55
#define DUCKDB_MINOR_VERSION 3
@@ -8,10 +8,10 @@
88
#define DUCKDB_MAJOR_VERSION 1
99
#endif
1010
#ifndef DUCKDB_VERSION
11-
#define DUCKDB_VERSION "v1.3.0-dev3647"
11+
#define DUCKDB_VERSION "v1.3.0-dev3649"
1212
#endif
1313
#ifndef DUCKDB_SOURCE_ID
14-
#define DUCKDB_SOURCE_ID "fb772b1840"
14+
#define DUCKDB_SOURCE_ID "9eb5eb814d"
1515
#endif
1616
#include "duckdb/function/table/system_functions.hpp"
1717
#include "duckdb/main/database.hpp"

0 commit comments

Comments
 (0)