1 | #include "duckdb/common/vector_operations/vector_operations.hpp" |
---|---|
2 | #include "duckdb/execution/expression_executor.hpp" |
3 | #include "duckdb/planner/expression/bound_parameter_expression.hpp" |
4 | |
5 | namespace duckdb { |
6 | |
7 | unique_ptr<ExpressionState> ExpressionExecutor::InitializeState(const BoundParameterExpression &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 BoundParameterExpression &expr, ExpressionState *state, |
15 | const SelectionVector *sel, idx_t count, Vector &result) { |
16 | D_ASSERT(expr.parameter_data); |
17 | D_ASSERT(expr.parameter_data->return_type == expr.return_type); |
18 | D_ASSERT(expr.parameter_data->value.type() == expr.return_type); |
19 | result.Reference(value: expr.parameter_data->value); |
20 | } |
21 | |
22 | } // namespace duckdb |
23 |