1
2#include "duckdb/optimizer/join_order/estimated_properties.hpp"
3
4namespace duckdb {
5
6template <>
7double EstimatedProperties::GetCardinality() const {
8 return cardinality;
9}
10
11template <>
12idx_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
17double EstimatedProperties::GetCost() const {
18 return cost;
19}
20
21void EstimatedProperties::SetCardinality(double new_card) {
22 cardinality = new_card;
23}
24
25void EstimatedProperties::SetCost(double new_cost) {
26 cost = new_cost;
27}
28
29} // namespace duckdb
30