1 | |
---|---|
2 | #include "duckdb/optimizer/join_order/estimated_properties.hpp" |
3 | |
4 | namespace duckdb { |
5 | |
6 | template <> |
7 | double EstimatedProperties::GetCardinality() const { |
8 | return cardinality; |
9 | } |
10 | |
11 | template <> |
12 | idx_t EstimatedProperties::GetCardinality() const { |
13 | auto max_idx_t = NumericLimits<idx_t>::Maximum() - 10000; |
14 | return MinValue<double>(a: cardinality, b: max_idx_t); |
15 | } |
16 | |
17 | double EstimatedProperties::GetCost() const { |
18 | return cost; |
19 | } |
20 | |
21 | void EstimatedProperties::SetCardinality(double new_card) { |
22 | cardinality = new_card; |
23 | } |
24 | |
25 | void EstimatedProperties::SetCost(double new_cost) { |
26 | cost = new_cost; |
27 | } |
28 | |
29 | } // namespace duckdb |
30 |