1#include "duckdb/execution/expression_executor.hpp"
2#include "duckdb/planner/expression/bound_reference_expression.hpp"
3
4using namespace duckdb;
5using namespace std;
6
7unique_ptr<ExpressionState> ExpressionExecutor::InitializeState(BoundReferenceExpression &expr,
8 ExpressionExecutorState &root) {
9 return nullptr;
10}
11
12void ExpressionExecutor::Execute(BoundReferenceExpression &expr, ExpressionState *state, const SelectionVector *sel,
13 idx_t count, Vector &result) {
14 assert(expr.index != INVALID_INDEX);
15 assert(expr.index < chunk->column_count());
16 if (sel) {
17 result.Slice(chunk->data[expr.index], *sel, count);
18 } else {
19 result.Reference(chunk->data[expr.index]);
20 }
21}
22