diff --git a/spatial/src/spatial/core/index/rtree/rtree_index_plan_scan.cpp b/spatial/src/spatial/core/index/rtree/rtree_index_plan_scan.cpp index b420233..65f5c18 100644 --- a/spatial/src/spatial/core/index/rtree/rtree_index_plan_scan.cpp +++ b/spatial/src/spatial/core/index/rtree/rtree_index_plan_scan.cpp @@ -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);