Skip to content

Commit

Permalink
Exclude built-in scalar functions
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Jan 29, 2024
1 parent e4f3638 commit eaf4c11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion datafusion/physical-expr/src/scalar_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ impl PhysicalExpr for ScalarFunctionExpr {
{
vec![ColumnarValue::create_null_array(batch.num_rows())]
}
(0, _) if self.signature.type_signature.supports_zero_argument() => {
// If the function supports zero argument, we pass in a null array indicating the batch size.
// This is for user-defined functions.
(0, Err(_)) if self.signature.type_signature.supports_zero_argument() => {
vec![ColumnarValue::create_null_array(batch.num_rows())]
}
_ => self
Expand Down

0 comments on commit eaf4c11

Please sign in to comment.