Skip to content

Commit 9b68f8c

Browse files
committed
Fix docs
1 parent 82ee464 commit 9b68f8c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/source/library-user-guide/adding-udfs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,8 @@ use datafusion_expr::Expr;
10751075
pub struct EchoFunction {}
10761076

10771077
impl TableFunctionImpl for EchoFunction {
1078-
fn call(&self, exprs: &[Expr]) -> Result<Arc<dyn TableProvider>> {
1079-
let Some(Expr::Literal(ScalarValue::Int64(Some(value)))) = exprs.get(0) else {
1078+
fn call(&self, exprs: &[(datafusion_expr::Expr, Option<std::string::String>)]) -> Result<Arc<dyn TableProvider>> {
1079+
let Some((Expr::Literal(ScalarValue::Int64(Some(value))), _)) = exprs.get(0) else {
10801080
return plan_err!("First argument must be an integer");
10811081
};
10821082

@@ -1116,8 +1116,8 @@ With the UDTF implemented, you can register it with the `SessionContext`:
11161116
# pub struct EchoFunction {}
11171117
#
11181118
# impl TableFunctionImpl for EchoFunction {
1119-
# fn call(&self, exprs: &[Expr]) -> Result<Arc<dyn TableProvider>> {
1120-
# let Some(Expr::Literal(ScalarValue::Int64(Some(value)))) = exprs.get(0) else {
1119+
# fn call(&self, exprs: &[(datafusion_expr::Expr, Option<std::string::String>)]) -> Result<Arc<dyn TableProvider>> {
1120+
# let Some((Expr::Literal(ScalarValue::Int64(Some(value))), _)) = exprs.get(0) else {
11211121
# return plan_err!("First argument must be an integer");
11221122
# };
11231123
#

0 commit comments

Comments
 (0)