| 1 | #include "duckdb/common/vector_operations/vector_operations.hpp" |
|---|---|
| 2 | #include "duckdb/execution/expression_executor.hpp" |
| 3 | #include "duckdb/planner/expression/bound_constant_expression.hpp" |
| 4 | |
| 5 | namespace duckdb { |
| 6 | |
| 7 | unique_ptr<ExpressionState> ExpressionExecutor::InitializeState(const BoundConstantExpression &expr, |
| 8 | ExpressionExecutorState &root) { |
| 9 | auto result = make_uniq<ExpressionState>(args: expr, args&: root); |
| 10 | result->Finalize(); |
| 11 | return result; |
| 12 | } |
| 13 | |
| 14 | void ExpressionExecutor::Execute(const BoundConstantExpression &expr, ExpressionState *state, |
| 15 | const SelectionVector *sel, idx_t count, Vector &result) { |
| 16 | D_ASSERT(expr.value.type() == expr.return_type); |
| 17 | result.Reference(value: expr.value); |
| 18 | } |
| 19 | |
| 20 | } // namespace duckdb |
| 21 |