File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
src/duckdb/src/function/table Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 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
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"
You can’t perform that action at this time.
0 commit comments