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 ;
@@ -60,7 +60,6 @@ use crate::duckdb::LogicalType;
6060use crate :: duckdb:: TableFilterSetRef ;
6161use crate :: duckdb:: TableFunction ;
6262use crate :: duckdb:: TableInitInput ;
63- use crate :: duckdb:: VirtualColumnsResultRef ;
6463use crate :: exporter:: ArrayExporter ;
6564use crate :: exporter:: ConversionCache ;
6665
@@ -74,17 +73,15 @@ use crate::exporter::ConversionCache;
7473/// If you define COLUMN_IDENTIFIER_EMPTY, planner takes it, otherwise the
7574/// first column. As we don't want to fill the output chunk and we can leave
7675/// it uninitialized in this case, we define COLUMN_IDENTIFIER_EMPTY as a
77- /// virtual column in our table function vtab's get_virtual_columns.
78- /// See vortex-duckdb/cpp/include/duckdb_vx/table_function.h
79- /// See virtual_columns in this file
76+ /// virtual column.
77+ /// See vortex-duckdb/cpp/table_function.cpp
8078static EMPTY_COLUMN_IDX : u64 = 18446744073709551614 ;
81- static EMPTY_COLUMN_NAME : & str = "" ;
8279
8380/// A trait for table functions that resolve to a [`DataSourceRef`].
8481///
8582/// Implementors only need to define how parameters are declared and how binding produces a
8683/// data source. All other [`TableFunction`] methods (init, scan, progress, filter pushdown,
87- /// cardinality, partitioning, virtual columns ) are provided by a blanket implementation.
84+ /// cardinality, partitioning) are provided by a blanket implementation.
8885pub ( crate ) trait DataSourceTableFunction : Sized + Debug {
8986 /// Returns the positional parameters of the table function.
9087 fn parameters ( ) -> Vec < LogicalType > {
@@ -442,10 +439,6 @@ impl<T: DataSourceTableFunction> TableFunction for T {
442439
443440 Some ( result)
444441 }
445-
446- fn virtual_columns ( _bind_data : & Self :: BindData , result : & mut VirtualColumnsResultRef ) {
447- result. register ( EMPTY_COLUMN_IDX , EMPTY_COLUMN_NAME , & LogicalType :: bool ( ) ) ;
448- }
449442}
450443
451444// ---------------------------------------------------------------------------
0 commit comments