55//!
66//! Table functions that resolve to a [`DataSourceRef`] can implement [`DataSourceTableFunction`]
77//! to get a blanket [`TableFunction`] implementation covering init, scan, progress, filter
8- //! pushdown, cardinality, partitioning, and virtual columns .
8+ //! pushdown, cardinality, and partitioning .
99
1010use std:: ffi:: CString ;
1111use std:: fmt:: Debug ;
@@ -69,7 +69,6 @@ use crate::duckdb::LogicalType;
6969use crate :: duckdb:: TableFilterSetRef ;
7070use crate :: duckdb:: TableFunction ;
7171use crate :: duckdb:: TableInitInput ;
72- use crate :: duckdb:: VirtualColumnsResultRef ;
7372use crate :: exporter:: ArrayExporter ;
7473use crate :: exporter:: ConversionCache ;
7574
@@ -83,17 +82,15 @@ use crate::exporter::ConversionCache;
8382/// If you define COLUMN_IDENTIFIER_EMPTY, planner takes it, otherwise the
8483/// first column. As we don't want to fill the output chunk and we can leave
8584/// it uninitialized in this case, we define COLUMN_IDENTIFIER_EMPTY as a
86- /// virtual column in our table function vtab's get_virtual_columns.
87- /// See vortex-duckdb/cpp/include/duckdb_vx/table_function.h
88- /// See virtual_columns in this file
85+ /// virtual column.
86+ /// See vortex-duckdb/cpp/table_function.cpp
8987static EMPTY_COLUMN_IDX : u64 = 18446744073709551614 ;
90- static EMPTY_COLUMN_NAME : & str = "" ;
9188
9289/// A trait for table functions that resolve to a [`DataSourceRef`].
9390///
9491/// Implementors only need to define how parameters are declared and how binding produces a
9592/// data source. All other [`TableFunction`] methods (init, scan, progress, filter pushdown,
96- /// cardinality, partitioning, virtual columns ) are provided by a blanket implementation.
93+ /// cardinality, partitioning) are provided by a blanket implementation.
9794pub ( crate ) trait DataSourceTableFunction : Sized + Debug {
9895 /// Returns the positional parameters of the table function.
9996 fn parameters ( ) -> Vec < LogicalType > {
@@ -555,10 +552,6 @@ impl<T: DataSourceTableFunction> TableFunction for T {
555552
556553 Some ( result)
557554 }
558-
559- fn virtual_columns ( _bind_data : & Self :: BindData , result : & mut VirtualColumnsResultRef ) {
560- result. register ( EMPTY_COLUMN_IDX , EMPTY_COLUMN_NAME , & LogicalType :: bool ( ) ) ;
561- }
562555}
563556
564557// ---------------------------------------------------------------------------
0 commit comments