SteveLauC commented on code in PR #8578:
URL: https://github.com/apache/arrow-datafusion/pull/8578#discussion_r1505483541
##########
datafusion/expr/src/udf.rs:
##########
@@ -17,21 +17,32 @@
//! [`ScalarUDF`]: Scalar User Defined Functions
-use crate::{Expr, ReturnTypeFunction, ScalarFunctionImplementation, Signature};
+use crate::{
+ ColumnarValue, Expr, ReturnTypeFunction, ScalarFunctionImplementation,
Signature,
+};
use arrow::datatypes::DataType;
use datafusion_common::Result;
+use std::any::Any;
use std::fmt;
use std::fmt::Debug;
use std::fmt::Formatter;
use std::sync::Arc;
/// Logical representation of a Scalar User Defined Function.
///
-/// A scalar function produces a single row output for each row of input.
+/// A scalar function produces a single row output for each row of input. This
+/// struct contains the information DataFusion needs to plan and invoke
+/// functions you supply such name, type signature, return type, and actual
+/// implementation.
///
-/// This struct contains the information DataFusion needs to plan and invoke
-/// functions such name, type signature, return type, and actual
implementation.
///
+/// 1. For simple (less performant) use cases, use [`create_udf`] and
[`simple_udf.rs`].
Review Comment:
> less performant
Hi, is there anyone who would like to explain a bit about why `create_udf()`
is less performant than the UDFs created by `ScalarUDFImpl`?
--
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]