1 | #include "duckdb/optimizer/statistics_propagator.hpp" |
---|---|
2 | #include "duckdb/planner/expression/bound_constant_expression.hpp" |
3 | #include "duckdb/storage/statistics/distinct_statistics.hpp" |
4 | #include "duckdb/storage/statistics/list_stats.hpp" |
5 | #include "duckdb/storage/statistics/struct_stats.hpp" |
6 | |
7 | namespace duckdb { |
8 | |
9 | unique_ptr<BaseStatistics> StatisticsPropagator::StatisticsFromValue(const Value &input) { |
10 | return BaseStatistics::FromConstant(input).ToUnique(); |
11 | } |
12 | |
13 | unique_ptr<BaseStatistics> StatisticsPropagator::PropagateExpression(BoundConstantExpression &constant, |
14 | unique_ptr<Expression> *expr_ptr) { |
15 | return StatisticsFromValue(input: constant.value); |
16 | } |
17 | |
18 | } // namespace duckdb |
19 |