askalt commented on code in PR #20222: URL: https://github.com/apache/datafusion/pull/20222#discussion_r2783817122
########## docs/source/library-user-guide/functions/adding-udfs.md: ########## @@ -1388,15 +1388,16 @@ in the CLI to read the metadata from a Parquet file. The simple UDTF used here takes a single `Int64` argument and returns a table with a single column with the value of the argument. To create a function in DataFusion, you need to implement the `TableFunctionImpl` trait. This trait has a -single method, `call`, that takes a slice of `Expr`s and returns a `Result<Arc<dyn TableProvider>>`. +single method, `call_with_args`, that takes a `TableFunctionArgs` struct and returns a `Result<Arc<dyn TableProvider>>`. +Passed struct includes function arguments as a slice of `Expr`s. -In the `call` method, you parse the input `Expr`s and return a `TableProvider`. You might also want to do some +In the `call_with_args` method, you parse the input `Expr`s and return a `TableProvider`. You might also want to do some Review Comment: I thought about it but decided to keep a basic example simple. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
