Skip to content

Commit

Permalink
Merge pull request #449 from Maxxen/dev
Browse files Browse the repository at this point in the history
Calculate cardinality after setting function pointer in rtree scan
  • Loading branch information
Maxxen authored Nov 8, 2024
2 parents 7ea79b6 + 28cafa4 commit 5ae714c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ class RTreeIndexScanOptimizer : public OptimizerExtension {
}

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

0 comments on commit 5ae714c

Please sign in to comment.