| 1 | |
|---|---|
| 2 | #include "duckdb/optimizer/statistics_propagator.hpp" |
| 3 | #include "duckdb/planner/operator/logical_order.hpp" |
| 4 | |
| 5 | namespace duckdb { |
| 6 | |
| 7 | unique_ptr<NodeStatistics> StatisticsPropagator::PropagateStatistics(LogicalOrder &order, |
| 8 | unique_ptr<LogicalOperator> *node_ptr) { |
| 9 | // first propagate to the child |
| 10 | node_stats = PropagateStatistics(node_ptr&: order.children[0]); |
| 11 | |
| 12 | // then propagate to each of the order expressions |
| 13 | for (auto &bound_order : order.orders) { |
| 14 | PropagateAndCompress(expr&: bound_order.expression, stats&: bound_order.stats); |
| 15 | } |
| 16 | return std::move(node_stats); |
| 17 | } |
| 18 | |
| 19 | } // namespace duckdb |
| 20 |