|
|
LimitNodeType | type = LimitNodeType::UNSET |
|
idx_t | constant_integer = 0 |
| | Integer value, if value is a constant non-percentage.
|
|
double | constant_percentage = -1 |
| | Percentage value, if value is a constant percentage.
|
|
unique_ptr< Expression > | expression |
| | Expression in case node is not constant.
|
◆ BoundLimitNode() [1/5]
| duckdb::BoundLimitNode::BoundLimitNode |
( |
| ) |
|
375132 : type(LimitNodeType::UNSET) {
375133}
◆ BoundLimitNode() [2/5]
| duckdb::BoundLimitNode::BoundLimitNode |
( |
LimitNodeType | type, |
|
|
idx_t | constant_integer, |
|
|
double | constant_percentage, |
|
|
unique_ptr< Expression > | expression ) |
375130}
double constant_percentage
Percentage value, if value is a constant percentage.
Definition duckdb.hpp:17894
unique_ptr< Expression > expression
Expression in case node is not constant.
Definition duckdb.hpp:17896
idx_t constant_integer
Integer value, if value is a constant non-percentage.
Definition duckdb.hpp:17892
◆ BoundLimitNode() [3/5]
| duckdb::BoundLimitNode::BoundLimitNode |
( |
int64_t | constant_value | ) |
|
|
explicitprivate |
375136 : type(LimitNodeType::CONSTANT_VALUE),
constant_integer(NumericCast<idx_t>(constant_value)) {
375137}
◆ BoundLimitNode() [4/5]
| duckdb::BoundLimitNode::BoundLimitNode |
( |
double | percentage_value | ) |
|
|
explicitprivate |
◆ BoundLimitNode() [5/5]
375144 : type(is_percentage ? LimitNodeType::EXPRESSION_PERCENTAGE : LimitNodeType::EXPRESSION_VALUE),
375146}
◆ ConstantValue()
| BoundLimitNode duckdb::BoundLimitNode::ConstantValue |
( |
int64_t | value | ) |
|
|
static |
375148 {
375149 return BoundLimitNode(value);
375150}
◆ ConstantPercentage()
| BoundLimitNode duckdb::BoundLimitNode::ConstantPercentage |
( |
double | percentage | ) |
|
|
static |
375152 {
375153 return BoundLimitNode(percentage);
375154}
◆ ExpressionValue()
375156 {
375157 return BoundLimitNode(std::move(
expression),
false);
375158}
◆ ExpressionPercentage()
375160 {
375161 return BoundLimitNode(std::move(
expression),
true);
375162}
◆ Type()
| LimitNodeType duckdb::BoundLimitNode::Type |
( |
| ) |
const |
|
inline |
17867 {
17868 return type;
17869 }
◆ GetConstantValue()
| idx_t duckdb::BoundLimitNode::GetConstantValue |
( |
| ) |
const |
Returns the constant value, only valid if Type() == CONSTANT_VALUE.
375164 {
375165 if (Type() != LimitNodeType::CONSTANT_VALUE) {
375166 throw InternalException("BoundLimitNode::GetConstantValue called but limit is not a constant value");
375167 }
375169}
◆ GetConstantPercentage()
| double duckdb::BoundLimitNode::GetConstantPercentage |
( |
| ) |
const |
Returns the constant percentage, only valid if Type() == CONSTANT_PERCENTAGE.
375171 {
375172 if (Type() != LimitNodeType::CONSTANT_PERCENTAGE) {
375173 throw InternalException("BoundLimitNode::GetConstantPercentage called but limit is not a constant percentage");
375174 }
375176}
◆ GetValueExpression()
| const Expression & duckdb::BoundLimitNode::GetValueExpression |
( |
| ) |
const |
Returns the constant percentage, only valid if Type() == EXPRESSION_VALUE.
375178 {
375179 if (Type() != LimitNodeType::EXPRESSION_VALUE) {
375180 throw InternalException("BoundLimitNode::GetValueExpression called but limit is not an expression value");
375181 }
375183}
◆ GetPercentageExpression()
| const Expression & duckdb::BoundLimitNode::GetPercentageExpression |
( |
| ) |
const |
Returns the constant percentage, only valid if Type() == EXPRESSION_PERCENTAGE.
375185 {
375186 if (Type() != LimitNodeType::EXPRESSION_PERCENTAGE) {
375187 throw InternalException(
375188 "BoundLimitNode::GetPercentageExpression called but limit is not an expression percentage");
375189 }
375191}
◆ GetExpression()
Returns a pointer to the expression - should only be used for limit-agnostic optimizations. Prefer using the methods above in other scenarios.
◆ Serialize()
| void duckdb::BoundLimitNode::Serialize |
( |
Serializer & | serializer | ) |
const |
417276 {
417277 serializer.WriteProperty<LimitNodeType>(100, "type", type);
417280 serializer.WritePropertyWithDefault<unique_ptr<Expression>>(103,
"expression",
expression);
417281}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
◆ Deserialize()
| BoundLimitNode duckdb::BoundLimitNode::Deserialize |
( |
Deserializer & | deserializer | ) |
|
|
static |
417283 {
417284 auto type = deserializer.ReadProperty<LimitNodeType>(100, "type");
417286 auto constant_percentage = deserializer.ReadProperty<
double>(102,
"constant_percentage");
417287 auto expression = deserializer.ReadPropertyWithDefault<unique_ptr<Expression>>(103,
"expression");
417289 return result;
417290}
The documentation for this struct was generated from the following files: