duckdb 0.2.10-dev429.0 → 0.2.10-dev437.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/duckdb.cpp +15 -14
- package/src/duckdb.hpp +2 -2
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -64753,6 +64753,19 @@ void CheckForPerfectJoinOpt(LogicalComparisonJoin &op, PerfectHashJoinStats &joi
|
|
|
64753
64753
|
return;
|
|
64754
64754
|
}
|
|
64755
64755
|
|
|
64756
|
+
static void CanUseIndexJoin(TableScanBindData *tbl, Expression &expr, Index **result_index) {
|
|
64757
|
+
tbl->table->storage->info->indexes.Scan([&](Index &index) {
|
|
64758
|
+
if (index.unbound_expressions.size() != 1) {
|
|
64759
|
+
return false;
|
|
64760
|
+
}
|
|
64761
|
+
if (expr.alias == index.unbound_expressions[0]->alias) {
|
|
64762
|
+
*result_index = &index;
|
|
64763
|
+
return true;
|
|
64764
|
+
}
|
|
64765
|
+
return false;
|
|
64766
|
+
});
|
|
64767
|
+
}
|
|
64768
|
+
|
|
64756
64769
|
void TransformIndexJoin(ClientContext &context, LogicalComparisonJoin &op, Index **left_index, Index **right_index,
|
|
64757
64770
|
PhysicalOperator *left, PhysicalOperator *right) {
|
|
64758
64771
|
auto &transaction = Transaction::GetTransaction(context);
|
|
@@ -64764,26 +64777,14 @@ void TransformIndexJoin(ClientContext &context, LogicalComparisonJoin &op, Index
|
|
|
64764
64777
|
auto &tbl_scan = (PhysicalTableScan &)*left;
|
|
64765
64778
|
auto tbl = dynamic_cast<TableScanBindData *>(tbl_scan.bind_data.get());
|
|
64766
64779
|
if (CanPlanIndexJoin(transaction, tbl, tbl_scan)) {
|
|
64767
|
-
tbl
|
|
64768
|
-
if (index.unbound_expressions[0]->alias == op.conditions[0].left->alias) {
|
|
64769
|
-
*left_index = &index;
|
|
64770
|
-
return true;
|
|
64771
|
-
}
|
|
64772
|
-
return false;
|
|
64773
|
-
});
|
|
64780
|
+
CanUseIndexJoin(tbl, *op.conditions[0].left, left_index);
|
|
64774
64781
|
}
|
|
64775
64782
|
}
|
|
64776
64783
|
if (right->type == PhysicalOperatorType::TABLE_SCAN) {
|
|
64777
64784
|
auto &tbl_scan = (PhysicalTableScan &)*right;
|
|
64778
64785
|
auto tbl = dynamic_cast<TableScanBindData *>(tbl_scan.bind_data.get());
|
|
64779
64786
|
if (CanPlanIndexJoin(transaction, tbl, tbl_scan)) {
|
|
64780
|
-
tbl
|
|
64781
|
-
if (index.unbound_expressions[0]->alias == op.conditions[0].right->alias) {
|
|
64782
|
-
*right_index = &index;
|
|
64783
|
-
return true;
|
|
64784
|
-
}
|
|
64785
|
-
return false;
|
|
64786
|
-
});
|
|
64787
|
+
CanUseIndexJoin(tbl, *op.conditions[0].right, right_index);
|
|
64787
64788
|
}
|
|
64788
64789
|
}
|
|
64789
64790
|
}
|
package/src/duckdb.hpp
CHANGED
|
@@ -10,8 +10,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
10
10
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
|
-
#define DUCKDB_SOURCE_ID "
|
|
14
|
-
#define DUCKDB_VERSION "0.2.10-
|
|
13
|
+
#define DUCKDB_SOURCE_ID "ca1fe636e"
|
|
14
|
+
#define DUCKDB_VERSION "0.2.10-dev437"
|
|
15
15
|
//===----------------------------------------------------------------------===//
|
|
16
16
|
// DuckDB
|
|
17
17
|
//
|