1 | #include "duckdb/optimizer/statistics_propagator.hpp" |
---|---|
2 | #include "duckdb/planner/operator/logical_limit.hpp" |
3 | |
4 | namespace duckdb { |
5 | |
6 | unique_ptr<NodeStatistics> StatisticsPropagator::PropagateStatistics(LogicalLimit &limit, |
7 | unique_ptr<LogicalOperator> *node_ptr) { |
8 | // propagate statistics in the child node |
9 | PropagateStatistics(node_ptr&: limit.children[0]); |
10 | // return the node stats, with as expected cardinality the amount specified in the limit |
11 | return make_uniq<NodeStatistics>(args&: limit.limit_val, args&: limit.limit_val); |
12 | } |
13 | |
14 | } // namespace duckdb |
15 |