ZhangHuiGui commented on code in PR #40396:
URL: https://github.com/apache/arrow/pull/40396#discussion_r1522416844


##########
cpp/src/arrow/compute/expression.cc:
##########
@@ -845,7 +845,8 @@ Result<Expression> FoldConstants(Expression expr) {
       std::move(expr), [](Expression expr) { return expr; },
       [](Expression expr, ...) -> Result<Expression> {
         auto call = CallNotNull(expr);
-        if (std::all_of(call->arguments.begin(), call->arguments.end(),
+        if (!call->arguments.empty() &&

Review Comment:
   Yes, you're right. The init opts for all function's inherited classes is 
unnecessary. I added the impure init opt only for ScalarFunction, it's 
reasonable.



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