◆ ConstantFoldingRule()
319978 auto op = make_uniq<ConstantFoldingExpressionMatcher>();
319979 root = std::move(op);
319980}
ExpressionRewriter & rewriter
The expression rewriter this rule belongs to.
Definition duckdb.cpp:69564
unique_ptr< ExpressionMatcher > root
The expression matcher of the rule.
Definition duckdb.cpp:69566
◆ Apply()
Implements duckdb::Rule.
319983 {
319984 auto &
root = bindings[0].get();
319985
319986 D_ASSERT(
root.IsFoldable() &&
root.GetExpressionType() != ExpressionType::VALUE_CONSTANT);
319987
319988
319989 Value result_value;
319991 return nullptr;
319992 }
319993 D_ASSERT(result_value.type().InternalType() ==
root.return_type.InternalType());
319994
319995 return make_uniq<BoundConstantExpression>(result_value);
319996}
static DUCKDB_API bool TryEvaluateScalar(ClientContext &context, const Expression &expr, Value &result)
Try to evaluate a scalar expression and fold it into a single value, returns false if an exception is...
Definition duckdb.cpp:150008
The documentation for this class was generated from the following file: