Skip to content

Commit 5ae714c

Browse files
authored
Merge pull request duckdb#449 from Maxxen/dev
Calculate cardinality after setting function pointer in rtree scan
2 parents 7ea79b6 + 28cafa4 commit 5ae714c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spatial/src/spatial/core/index/rtree/rtree_index_plan_scan.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ class RTreeIndexScanOptimizer : public OptimizerExtension {
193193
}
194194

195195
// If there are no table filters pushed down into the get, we can just replace the get with the index scan
196-
const auto cardinality = get.function.cardinality(context, bind_data.get());
197196
get.function = RTreeIndexScanFunction::GetFunction();
197+
const auto cardinality = get.function.cardinality(context, bind_data.get());
198198
get.has_estimated_cardinality = cardinality->has_estimated_cardinality;
199199
get.estimated_cardinality = cardinality->estimated_cardinality;
200200
get.bind_data = std::move(bind_data);

0 commit comments

Comments
 (0)