Skip to content

Commit a2e086d

Browse files
timsaucerclaude
andcommitted
refactor: migrate FFI example table function to call_with_args
DataFusion 53 deprecated `TableFunctionImpl::call(args: &[Expr])` in favor of `call_with_args(args: TableFunctionArgs)`. `PyTableFunction` was migrated in 5a64b0d; this brings the FFI example along so it no longer relies on the deprecated entry point. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent dac9ec6 commit a2e086d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

examples/datafusion-ffi-example/src/table_function.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717

1818
use std::sync::Arc;
1919

20-
use datafusion_catalog::{TableFunctionImpl, TableProvider};
20+
use datafusion_catalog::{TableFunctionArgs, TableFunctionImpl, TableProvider};
2121
use datafusion_common::error::Result as DataFusionResult;
22-
use datafusion_expr::Expr;
2322
use datafusion_ffi::udtf::FFI_TableFunction;
2423
use datafusion_python_util::ffi_logical_codec_from_pycapsule;
2524
use pyo3::types::PyCapsule;
@@ -59,7 +58,7 @@ impl MyTableFunction {
5958
}
6059

6160
impl TableFunctionImpl for MyTableFunction {
62-
fn call(&self, _args: &[Expr]) -> DataFusionResult<Arc<dyn TableProvider>> {
61+
fn call_with_args(&self, _args: TableFunctionArgs) -> DataFusionResult<Arc<dyn TableProvider>> {
6362
let provider = MyTableProvider::new(4, 3, 2).create_table()?;
6463
Ok(Arc::new(provider))
6564
}

0 commit comments

Comments
 (0)