Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::TableFunction Class Reference
Inheritance diagram for duckdb::TableFunction:
Collaboration diagram for duckdb::TableFunction:

Public Member Functions

DUCKDB_API TableFunction (string name, const vector< LogicalType > &arguments, table_function_t function, table_function_bind_t bind=nullptr, table_function_init_global_t init_global=nullptr, table_function_init_local_t init_local=nullptr)
DUCKDB_API TableFunction (const vector< LogicalType > &arguments, table_function_t function, table_function_bind_t bind=nullptr, table_function_init_global_t init_global=nullptr, table_function_init_local_t init_local=nullptr)
DUCKDB_API TableFunction (string name, const vector< LogicalType > &arguments, std::nullptr_t function, table_function_bind_t bind=nullptr, table_function_init_global_t init_global=nullptr, table_function_init_local_t init_local=nullptr)
DUCKDB_API TableFunction (const vector< LogicalType > &arguments, std::nullptr_t function, table_function_bind_t bind=nullptr, table_function_init_global_t init_global=nullptr, table_function_init_local_t init_local=nullptr)
bool HasBindCallback () const
table_function_bind_t GetBindCallback () const
bool HasSerializationCallbacks () const
void SetSerializeCallback (table_function_serialize_t callback)
void SetDeserializeCallback (table_function_deserialize_t callback)
table_function_serialize_t GetSerializeCallback () const
table_function_deserialize_t GetDeserializeCallback () const
DUCKDB_API bool Equal (const TableFunction &rhs) const
DUCKDB_API bool operator== (const TableFunction &rhs) const
DUCKDB_API bool operator!= (const TableFunction &rhs) const
Public Member Functions inherited from duckdb::SimpleNamedParameterFunction
DUCKDB_API SimpleNamedParameterFunction (string name, vector< LogicalType > arguments, LogicalType varargs=LogicalType(LogicalTypeId::INVALID))
DUCKDB_API string ToString () const override
DUCKDB_API bool HasNamedParameters () const
Public Member Functions inherited from duckdb::SimpleFunction
DUCKDB_API SimpleFunction (string name, vector< LogicalType > arguments, LogicalType varargs=LogicalType(LogicalTypeId::INVALID))
DUCKDB_API bool HasVarArgs () const
Public Member Functions inherited from duckdb::Function
DUCKDB_API Function (string name)

Public Attributes

table_function_bind_t bind
table_function_bind_replace_t bind_replace
table_function_bind_operator_t bind_operator
table_function_init_global_t init_global
table_function_init_local_t init_local
table_function_t function
 The main function.
table_in_out_function_t in_out_function
 The table in-out function (if this is an in-out function).
table_in_out_function_final_t in_out_function_final
 The table in-out final function (if this is an in-out function).
table_statistics_t statistics
table_statistics_extended_t statistics_extended
table_function_dependency_t dependency
table_function_cardinality_t cardinality
table_function_rows_scanned_t rows_scanned
 (Optional) returns the number of rows that have benn scanned
table_function_pushdown_complex_filter_t pushdown_complex_filter
table_function_pushdown_expression_t pushdown_expression
 (Optional) whether or not this table function supports pushing down an expression into a TableFilter
table_function_to_string_t to_string
 (Optional) function for rendering the operator to a string in explain/profiling output (invoked pre-execution)
table_function_dynamic_to_string_t dynamic_to_string
 (Optional) function for rendering the operator to a string in profiling output (invoked post-execution)
table_function_progress_t table_scan_progress
 (Optional) return how much of the table we have scanned up to this point (% of the data)
table_function_get_partition_data_t get_partition_data
 (Optional) returns the partition info of the current scan operator
table_function_get_bind_info_t get_bind_info
 (Optional) returns extra bind info
table_function_type_pushdown_t type_pushdown
 (Optional) pushes down type information to scanner, returns true if pushdown was successful
table_function_get_multi_file_reader_t get_multi_file_reader
 (Optional) allows injecting a custom MultiFileReader implementation
table_function_supports_pushdown_type_t supports_pushdown_type
 (Optional) If this scanner supports filter pushdown, but not to all data types
table_function_supports_pushdown_extract_t supports_pushdown_extract
 (Optional) If this scanner supports projection pushdown of struct extracts
table_function_get_partition_info_t get_partition_info
 Get partition info of the table.
table_function_get_partition_stats_t get_partition_stats
 (Optional) get a list of all the partition stats of the table
table_function_get_virtual_columns_t get_virtual_columns
 (Optional) returns a list of virtual columns emitted by the table function
table_function_get_row_id_columns get_row_id_columns
 (Optional) returns a list of row id columns
table_function_set_scan_order set_scan_order
 (Optional) sets the order to scan the row groups in
table_function_serialize_t serialize
table_function_deserialize_t deserialize
bool verify_serialization = true
bool projection_pushdown
bool filter_pushdown
bool filter_prune
bool sampling_pushdown
bool late_materialization
 Whether or not the table function supports late materialization.
shared_ptr< TableFunctionInfo > function_info
 Additional function info, passed to the bind.
OrderPreservationType order_preservation_type = OrderPreservationType::INSERTION_ORDER
 The order preservation type of the table function.
TableFunctionInitialization global_initialization = TableFunctionInitialization::INITIALIZE_ON_EXECUTE
Public Attributes inherited from duckdb::SimpleNamedParameterFunction
named_parameter_type_map_t named_parameters
 The named parameters of the function.
Public Attributes inherited from duckdb::SimpleFunction
vector< LogicalType > arguments
 The set of arguments of the function.
vector< LogicalType > original_arguments
LogicalType varargs
Public Attributes inherited from duckdb::Function
string name
 The name of the function.
string extra_info
 Additional Information to specify function from it's name.
string catalog_name
string schema_name

Additional Inherited Members

Static Public Member Functions inherited from duckdb::Function
static DUCKDB_API string CallToString (const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const LogicalType &varargs=LogicalType::INVALID)
 Returns the formatted string name(arg1, arg2, ...).
static DUCKDB_API string CallToString (const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const LogicalType &varargs, const LogicalType &return_type)
 Returns the formatted string name(arg1, arg2..) -> return_type.
static DUCKDB_API string CallToString (const string &catalog_name, const string &schema_name, const string &name, const vector< LogicalType > &arguments, const named_parameter_type_map_t &named_parameters)
 Returns the formatted string name(arg1, arg2.., np1=a, np2=b, ...).
static DUCKDB_API void EraseArgument (SimpleFunction &bound_function, vector< unique_ptr< Expression > > &arguments, idx_t argument_index)
 Used in the bind to erase an argument from a function.

Constructor & Destructor Documentation

◆ TableFunction() [1/5]

duckdb::TableFunction::TableFunction ( )
252401 : TableFunction("", {}, nullptr, nullptr, nullptr, nullptr) {
252402}

◆ TableFunction() [2/5]

duckdb::TableFunction::TableFunction ( string name,
const vector< LogicalType > & arguments,
table_function_t function,
table_function_bind_t bind = nullptr,
table_function_init_global_t init_global = nullptr,
table_function_init_local_t init_local = nullptr )
252363 : SimpleNamedParameterFunction(std::move(name), arguments), bind(bind), bind_replace(nullptr),
252365 in_out_function(nullptr), in_out_function_final(nullptr), statistics(nullptr), statistics_extended(nullptr),
252366 dependency(nullptr), cardinality(nullptr), rows_scanned(nullptr), pushdown_complex_filter(nullptr),
252367 pushdown_expression(nullptr), to_string(nullptr), dynamic_to_string(nullptr), table_scan_progress(nullptr),
252368 get_partition_data(nullptr), get_bind_info(nullptr), type_pushdown(nullptr), get_multi_file_reader(nullptr),
252370 get_partition_stats(nullptr), get_virtual_columns(nullptr), get_row_id_columns(nullptr), set_scan_order(nullptr),
252371 serialize(nullptr), deserialize(nullptr), projection_pushdown(false), filter_pushdown(false), filter_prune(false),
252372 sampling_pushdown(false), late_materialization(false) {
252373}
string name
The name of the function.
Definition duckdb.hpp:13881
vector< LogicalType > arguments
The set of arguments of the function.
Definition duckdb.hpp:13917
table_function_progress_t table_scan_progress
(Optional) return how much of the table we have scanned up to this point (% of the data)
Definition duckdb.hpp:26594
table_function_get_partition_info_t get_partition_info
Get partition info of the table.
Definition duckdb.hpp:26608
table_function_get_virtual_columns_t get_virtual_columns
(Optional) returns a list of virtual columns emitted by the table function
Definition duckdb.hpp:26612
bool late_materialization
Whether or not the table function supports late materialization.
Definition duckdb.hpp:26635
table_function_cardinality_t cardinality
Definition duckdb.hpp:26581
table_function_pushdown_expression_t pushdown_expression
(Optional) whether or not this table function supports pushing down an expression into a TableFilter
Definition duckdb.hpp:26588
table_function_to_string_t to_string
(Optional) function for rendering the operator to a string in explain/profiling output (invoked pre-e...
Definition duckdb.hpp:26590
table_statistics_t statistics
Definition duckdb.hpp:26572
table_function_dynamic_to_string_t dynamic_to_string
(Optional) function for rendering the operator to a string in profiling output (invoked post-executio...
Definition duckdb.hpp:26592
table_function_bind_replace_t bind_replace
Definition duckdb.hpp:26550
table_function_get_row_id_columns get_row_id_columns
(Optional) returns a list of row id columns
Definition duckdb.hpp:26614
bool sampling_pushdown
Definition duckdb.hpp:26633
table_function_get_multi_file_reader_t get_multi_file_reader
(Optional) allows injecting a custom MultiFileReader implementation
Definition duckdb.hpp:26602
table_function_supports_pushdown_type_t supports_pushdown_type
(Optional) If this scanner supports filter pushdown, but not to all data types
Definition duckdb.hpp:26604
table_function_bind_operator_t bind_operator
Definition duckdb.hpp:26554
table_function_type_pushdown_t type_pushdown
(Optional) pushes down type information to scanner, returns true if pushdown was successful
Definition duckdb.hpp:26600
table_function_rows_scanned_t rows_scanned
(Optional) returns the number of rows that have benn scanned
Definition duckdb.hpp:26583
table_function_bind_t bind
Definition duckdb.hpp:26545
table_function_get_partition_data_t get_partition_data
(Optional) returns the partition info of the current scan operator
Definition duckdb.hpp:26596
table_statistics_extended_t statistics_extended
Definition duckdb.hpp:26575
table_function_t function
The main function.
Definition duckdb.hpp:26565
table_function_get_partition_stats_t get_partition_stats
(Optional) get a list of all the partition stats of the table
Definition duckdb.hpp:26610
bool filter_pushdown
Definition duckdb.hpp:26627
table_function_get_bind_info_t get_bind_info
(Optional) returns extra bind info
Definition duckdb.hpp:26598
table_function_dependency_t dependency
Definition duckdb.hpp:26578
table_function_init_global_t init_global
Definition duckdb.hpp:26559
table_in_out_function_final_t in_out_function_final
The table in-out final function (if this is an in-out function).
Definition duckdb.hpp:26569
bool filter_prune
Definition duckdb.hpp:26630
table_function_set_scan_order set_scan_order
(Optional) sets the order to scan the row groups in
Definition duckdb.hpp:26616
table_in_out_function_t in_out_function
The table in-out function (if this is an in-out function).
Definition duckdb.hpp:26567
bool projection_pushdown
Definition duckdb.hpp:26624
table_function_init_local_t init_local
Definition duckdb.hpp:26563
table_function_supports_pushdown_extract_t supports_pushdown_extract
(Optional) If this scanner supports projection pushdown of struct extracts
Definition duckdb.hpp:26606
table_function_pushdown_complex_filter_t pushdown_complex_filter
Definition duckdb.hpp:26586

◆ TableFunction() [3/5]

duckdb::TableFunction::TableFunction ( const vector< LogicalType > & arguments,
table_function_t function,
table_function_bind_t bind = nullptr,
table_function_init_global_t init_global = nullptr,
table_function_init_local_t init_local = nullptr )
252393 : TableFunction("", arguments, function_, bind, init_global, init_local) {
252394}

◆ TableFunction() [4/5]

duckdb::TableFunction::TableFunction ( string name,
const vector< LogicalType > & arguments,
std::nullptr_t function,
table_function_bind_t bind = nullptr,
table_function_init_global_t init_global = nullptr,
table_function_init_local_t init_local = nullptr )
252378 : SimpleNamedParameterFunction(std::move(name), arguments), bind(bind), bind_replace(nullptr),
252380 in_out_function(nullptr), in_out_function_final(nullptr), statistics(nullptr), statistics_extended(nullptr),
252381 dependency(nullptr), cardinality(nullptr), rows_scanned(nullptr), pushdown_complex_filter(nullptr),
252382 pushdown_expression(nullptr), to_string(nullptr), dynamic_to_string(nullptr), table_scan_progress(nullptr),
252383 get_partition_data(nullptr), get_bind_info(nullptr), type_pushdown(nullptr), get_multi_file_reader(nullptr),
252385 get_partition_stats(nullptr), get_virtual_columns(nullptr), get_row_id_columns(nullptr), set_scan_order(nullptr),
252386 serialize(nullptr), deserialize(nullptr), projection_pushdown(false), filter_pushdown(false), filter_prune(false),
252387 sampling_pushdown(false), late_materialization(false) {
252388}

◆ TableFunction() [5/5]

duckdb::TableFunction::TableFunction ( const vector< LogicalType > & arguments,
std::nullptr_t function,
table_function_bind_t bind = nullptr,
table_function_init_global_t init_global = nullptr,
table_function_init_local_t init_local = nullptr )
252398 : TableFunction("", arguments, function_, bind, init_global, init_local) {
252399}

Member Function Documentation

◆ HasBindCallback()

bool duckdb::TableFunction::HasBindCallback ( ) const
inline
26520 {
26521 return bind != nullptr;
26522 }

◆ GetBindCallback()

table_function_bind_t duckdb::TableFunction::GetBindCallback ( ) const
inline
26523 {
26524 return bind;
26525 }

◆ HasSerializationCallbacks()

bool duckdb::TableFunction::HasSerializationCallbacks ( ) const
inline
26526 {
26527 return serialize != nullptr && deserialize != nullptr;
26528 }

◆ SetSerializeCallback()

void duckdb::TableFunction::SetSerializeCallback ( table_function_serialize_t callback)
inline
26529 {
26530 serialize = callback;
26531 }

◆ SetDeserializeCallback()

void duckdb::TableFunction::SetDeserializeCallback ( table_function_deserialize_t callback)
inline
26532 {
26533 deserialize = callback;
26534 }

◆ GetSerializeCallback()

table_function_serialize_t duckdb::TableFunction::GetSerializeCallback ( ) const
inline
26535 {
26536 return serialize;
26537 }

◆ GetDeserializeCallback()

table_function_deserialize_t duckdb::TableFunction::GetDeserializeCallback ( ) const
inline
26538 {
26539 return deserialize;
26540 }

◆ Equal()

bool duckdb::TableFunction::Equal ( const TableFunction & rhs) const
252428 {
252429 // number of types
252430 if (this->arguments.size() != rhs.arguments.size()) {
252431 return false;
252432 }
252433 // argument types
252434 for (idx_t i = 0; i < this->arguments.size(); ++i) {
252435 if (this->arguments[i] != rhs.arguments[i]) {
252436 return false;
252437 }
252438 }
252439 // varargs
252440 if (this->varargs != rhs.varargs) {
252441 return false;
252442 }
252443
252444 return true; // they are equal
252445}
LogicalType varargs
Definition duckdb.hpp:13923
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ operator==()

bool duckdb::TableFunction::operator== ( const TableFunction & rhs) const
252404 {
252405 return name == rhs.name && arguments == rhs.arguments && varargs == rhs.varargs && bind == rhs.bind &&
252406 bind_replace == rhs.bind_replace && bind_operator == rhs.bind_operator && init_global == rhs.init_global &&
252407 init_local == rhs.init_local && function == rhs.function && in_out_function == rhs.in_out_function &&
252408 in_out_function_final == rhs.in_out_function_final && statistics == rhs.statistics &&
252409 dependency == rhs.dependency && cardinality == rhs.cardinality &&
252410 pushdown_complex_filter == rhs.pushdown_complex_filter && pushdown_expression == rhs.pushdown_expression &&
252411 to_string == rhs.to_string && dynamic_to_string == rhs.dynamic_to_string &&
252412 table_scan_progress == rhs.table_scan_progress && get_partition_data == rhs.get_partition_data &&
252413 get_bind_info == rhs.get_bind_info && type_pushdown == rhs.type_pushdown &&
252414 get_multi_file_reader == rhs.get_multi_file_reader && supports_pushdown_type == rhs.supports_pushdown_type &&
252415 get_partition_info == rhs.get_partition_info && get_partition_stats == rhs.get_partition_stats &&
252416 get_virtual_columns == rhs.get_virtual_columns && get_row_id_columns == rhs.get_row_id_columns &&
252417 serialize == rhs.serialize && deserialize == rhs.deserialize &&
252418 verify_serialization == rhs.verify_serialization && projection_pushdown == rhs.projection_pushdown &&
252419 filter_pushdown == rhs.filter_pushdown && filter_prune == rhs.filter_prune &&
252420 sampling_pushdown == rhs.sampling_pushdown && late_materialization == rhs.late_materialization &&
252421 global_initialization == rhs.global_initialization;
252422}
TableFunctionInitialization global_initialization
Definition duckdb.hpp:26644

◆ operator!=()

bool duckdb::TableFunction::operator!= ( const TableFunction & rhs) const
252424 {
252425 return !(*this == rhs);
252426}

Member Data Documentation

◆ bind

table_function_bind_t duckdb::TableFunction::bind

Bind function This function is used for determining the return type of a table producing function and returning bind data The returned FunctionData object should be constant and should not be changed during execution.

◆ bind_replace

table_function_bind_replace_t duckdb::TableFunction::bind_replace

(Optional) Bind replace function This function is called before the regular bind function. It allows returning a TableRef that will be used to to generate a logical plan that replaces the LogicalGet of a regularly bound TableFunction. The BindReplace can also return a nullptr to indicate a regular bind needs to be performed instead.

◆ bind_operator

table_function_bind_operator_t duckdb::TableFunction::bind_operator

(Optional) Bind operator function This function is called before the regular bind function - similar to bind_replace - but allows returning a custom LogicalOperator instead.

◆ init_global

table_function_init_global_t duckdb::TableFunction::init_global

(Optional) global init function Initialize the global operator state of the function. The global operator state is used to keep track of the progress in the table function and is shared between all threads working on the table function.

◆ init_local

table_function_init_local_t duckdb::TableFunction::init_local

(Optional) local init function Initialize the local operator state of the function. The local operator state is used to keep track of the progress in the table function and is thread-local.

◆ statistics

table_statistics_t duckdb::TableFunction::statistics

(Optional) statistics function Returns the statistics of a specified column

◆ statistics_extended

table_statistics_extended_t duckdb::TableFunction::statistics_extended

(Optional) statistics function fed a ColumnIndex instead of a column_t Returns the statistics of a specified column

◆ dependency

table_function_dependency_t duckdb::TableFunction::dependency

(Optional) dependency function Sets up which catalog entries this table function depend on

◆ cardinality

table_function_cardinality_t duckdb::TableFunction::cardinality

(Optional) cardinality function Returns the expected cardinality of this scan

◆ pushdown_complex_filter

table_function_pushdown_complex_filter_t duckdb::TableFunction::pushdown_complex_filter

(Optional) pushdown a set of arbitrary filter expressions, rather than only simple comparisons with a constant Any functions remaining in the expression list will be pushed as a regular filter after the scan

◆ projection_pushdown

bool duckdb::TableFunction::projection_pushdown

Whether or not the table function supports projection pushdown. If not supported a projection will be added that filters out unused columns.

◆ filter_pushdown

bool duckdb::TableFunction::filter_pushdown

Whether or not the table function supports filter pushdown. If not supported a filter will be added that applies the table filter directly.

◆ filter_prune

bool duckdb::TableFunction::filter_prune

Whether or not the table function can immediately prune out filter columns that are unused in the remainder of the query plan, e.g., "SELECT i FROM tbl WHERE j = 42;" - j does not need to leave the table function at all

◆ sampling_pushdown

bool duckdb::TableFunction::sampling_pushdown

Whether or not the table function supports sampling pushdown. If not supported a sample will be taken after the table function.

◆ global_initialization

TableFunctionInitialization duckdb::TableFunction::global_initialization = TableFunctionInitialization::INITIALIZE_ON_EXECUTE

When to call init_global By default init_global is called when the pipeline is ready for execution If this is set to INITIALIZE_ON_SCHEDULE the table function is initialized when the query is scheduled


The documentation for this class was generated from the following files: