Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions datafusion/expr/src/udf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,14 @@ pub trait ScalarUDFImpl: Debug + DynEq + DynHash + Send + Sync {
/// [`ExprSimplifyResult`] indicating the result of the simplification NOTE
/// if the function cannot be simplified, the arguments *MUST* be returned
/// unmodified
///
/// # Notes
///
/// The returned expression must have the same schema as the original
/// expression, including both the data type and nullability. For example,
/// if the original expression is nullable, the returned expression must
/// also be nullable, otherwise it may lead to schema verification errors
/// later in query planning.
fn simplify(
&self,
args: Vec<Expr>,
Expand Down