14struct ExecutionContext;
19struct TableFuncBindData;
20struct ScanTableFuncBindInput;
25 template<
class TARGET>
34 template<
class TARGET>
61 std::vector<common::ValueVector*>
vectors;
99 :
Function{}, tableFunc{nullptr}, bindFunc{nullptr}, initSharedStateFunc{nullptr},
100 initLocalStateFunc{nullptr} {};
103 std::vector<common::LogicalTypeID> inputTypes,
104 std::optional<table_func_finalize_t> finalizeFunc = {})
105 :
Function{std::move(name), std::move(inputTypes)}, tableFunc{tableFunc},
106 bindFunc{bindFunc}, initSharedStateFunc{initSharedFunc},
107 initLocalStateFunc{initLocalFunc} {
108 if (finalizeFunc.has_value()) {
109 this->finalizeFunc = finalizeFunc.value();
115 std::optional<table_func_finalize_t> finalizeFunc = {})
116 :
Function{std::move(name), std::move(inputTypes)}, tableFunc{tableFunc},
117 bindFunc{bindFunc}, initSharedStateFunc{initSharedFunc},
118 initLocalStateFunc{initLocalFunc}, progressFunc(progressFunc) {
119 if (finalizeFunc.has_value()) {
120 this->finalizeFunc = finalizeFunc.value();
125 return common::LogicalTypeUtils::toString(parameterTypeIDs);
#define KUZU_API
Definition api.h:25
Definition data_chunk.h:20
Contain client side configuration. We make profiler associated per query, so profiler is not maintain...
Definition client_context.h:57
uint64_t offset_t
Definition types.h:74
TO ku_dynamic_cast(FROM *old)
Definition cast.h:11
std::function< std::unique_ptr< TableFuncBindData >(main::ClientContext *, function::ScanTableFuncBindInput *)> table_func_bind_t
Definition table_functions.h:77
std::function< std::unique_ptr< TableFuncSharedState >(TableFunctionInitInput &)> table_func_init_shared_t
Definition table_functions.h:80
std::function< bool()> table_func_can_parallel_t
Definition table_functions.h:84
std::function< std::unique_ptr< TableFuncLocalState >( TableFunctionInitInput &, TableFuncSharedState *, storage::MemoryManager *)> table_func_init_local_t
Definition table_functions.h:82
std::function< common::offset_t(TableFuncInput &, TableFuncOutput &)> table_func_t
Definition table_functions.h:79
std::function< void(processor::ExecutionContext *, TableFuncSharedState *, TableFuncLocalState *)> table_func_finalize_t
Definition table_functions.h:86
std::function< double(TableFuncSharedState *sharedState)> table_func_progress_t
Definition table_functions.h:85
Definition array_utils.h:7
Definition table_functions.h:31
virtual ~TableFuncLocalState()=default
TARGET * ptrCast()
Definition table_functions.h:35
Definition table_functions.h:59
common::DataChunk dataChunk
Definition table_functions.h:60
DELETE_COPY_DEFAULT_MOVE(TableFuncOutput)
std::vector< common::ValueVector * > vectors
Definition table_functions.h:61
TableFuncOutput()=default
Definition table_functions.h:22
TARGET * ptrCast()
Definition table_functions.h:26
virtual ~TableFuncSharedState()=default
Definition table_functions.h:89
table_func_bind_t bindFunc
Definition table_functions.h:91
TableFunction(std::string name, table_func_t tableFunc, table_func_bind_t bindFunc, table_func_init_shared_t initSharedFunc, table_func_init_local_t initLocalFunc, std::vector< common::LogicalTypeID > inputTypes, std::optional< table_func_finalize_t > finalizeFunc={})
Definition table_functions.h:101
TableFunction(std::string name, table_func_t tableFunc, table_func_bind_t bindFunc, table_func_init_shared_t initSharedFunc, table_func_init_local_t initLocalFunc, table_func_progress_t progressFunc, std::vector< common::LogicalTypeID > inputTypes, std::optional< table_func_finalize_t > finalizeFunc={})
Definition table_functions.h:112
TableFunction()
Definition table_functions.h:98
table_func_init_local_t initLocalStateFunc
Definition table_functions.h:93
table_func_t tableFunc
Definition table_functions.h:90
std::string signatureToString() const override
Definition table_functions.h:124
table_func_init_shared_t initSharedStateFunc
Definition table_functions.h:92