10class ParsedExpression;
14struct ExecutionContext;
19struct TableFuncBindInput;
20struct TableFuncBindData;
25 template<
class TARGET>
34 template<
class TARGET>
61 std::vector<common::ValueVector*>
vectors;
102 :
Function{}, tableFunc{nullptr}, bindFunc{nullptr}, initSharedStateFunc{nullptr},
103 initLocalStateFunc{nullptr} {};
104 TableFunction(std::string name, std::vector<common::LogicalTypeID> inputTypes)
108 std::vector<common::LogicalTypeID> inputTypes,
109 std::optional<table_func_finalize_t> finalizeFunc = {})
110 :
Function{std::move(name), std::move(inputTypes)}, tableFunc{tableFunc},
111 bindFunc{bindFunc}, initSharedStateFunc{initSharedFunc},
112 initLocalStateFunc{initLocalFunc} {
113 if (finalizeFunc.has_value()) {
114 this->finalizeFunc = finalizeFunc.value();
120 std::optional<table_func_finalize_t> finalizeFunc = {})
121 :
Function{std::move(name), std::move(inputTypes)}, tableFunc{tableFunc},
122 bindFunc{bindFunc}, initSharedStateFunc{initSharedFunc},
123 initLocalStateFunc{initLocalFunc}, progressFunc(progressFunc) {
124 if (finalizeFunc.has_value()) {
125 this->finalizeFunc = finalizeFunc.value();
130 return common::LogicalTypeUtils::toString(parameterTypeIDs);
133 virtual std::unique_ptr<TableFunction>
copy()
const {
134 return std::make_unique<TableFunction>(*
this);
#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:61
uint64_t offset_t
Definition types.h:77
TO ku_dynamic_cast(FROM *old)
Definition cast.h:11
std::function< std::unique_ptr< TableFuncBindData >(main::ClientContext *, function::TableFuncBindInput *)> 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
std::function< std::string(main::ClientContext &, const TableFuncBindData &bindData)> table_func_rewrite_t
Definition table_functions.h:88
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: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:106
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:117
TableFunction()
Definition table_functions.h:101
table_func_rewrite_t rewriteFunc
Definition table_functions.h:99
TableFunction(std::string name, std::vector< common::LogicalTypeID > inputTypes)
Definition table_functions.h:104
std::string signatureToString() const override
Definition table_functions.h:129
virtual std::unique_ptr< TableFunction > copy() const
Definition table_functions.h:133