Kùzu C++ API
Loading...
Searching...
No Matches
pointer_function_executor.h
Go to the documentation of this file.
1#pragma once
2
3#include "value_vector.h"
4
5namespace kuzu {
6namespace function {
7
9 template<typename RESULT_TYPE, typename OP>
10 static void execute(common::ValueVector& result, void* dataPtr) {
11 if (result.state->getSelVector().isUnfiltered()) {
12 for (auto i = 0u; i < result.state->getSelVector().getSelSize(); i++) {
13 OP::operation(result.getValue<RESULT_TYPE>(i), dataPtr);
14 }
15 } else {
16 for (auto i = 0u; i < result.state->getSelVector().getSelSize(); i++) {
17 auto pos = result.state->getSelVector()[i];
18 OP::operation(result.getValue<RESULT_TYPE>(pos), dataPtr);
19 }
20 }
21 }
22};
23
24} // namespace function
25} // namespace kuzu
Definition value_vector.h:20
const T & getValue(uint32_t pos) const
Definition value_vector.h:61
std::shared_ptr< DataChunkState > state
Definition value_vector.h:106
Definition array_utils.h:7
Definition pointer_function_executor.h:8
static void execute(common::ValueVector &result, void *dataPtr)
Definition pointer_function_executor.h:10