haohuaijin commented on code in PR #10098:
URL: 
https://github.com/apache/arrow-datafusion/pull/10098#discussion_r1570245430


##########
datafusion/expr/src/expr.rs:
##########
@@ -1276,7 +1260,7 @@ impl Expr {
     pub fn short_circuits(&self) -> bool {
         match self {
             Expr::ScalarFunction(ScalarFunction { func_def, .. }) => {
-                matches!(func_def, ScalarFunctionDefinition::BuiltIn(fun) if 
*fun == BuiltinScalarFunction::Coalesce)
+                matches!(func_def, ScalarFunctionDefinition::UDF(fun) if 
fun.name().eq("coalesce"))

Review Comment:
   Adding the new API `is_short_circuits()`(default to false, when need set to 
true) to `ScalarUDF` and `ScalarUDFImpl` might be a good way to do this because 
users may want to define their own short-circuit functions.



-- 
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]

Reply via email to