bkietz commented on code in PR #40396:
URL: https://github.com/apache/arrow/pull/40396#discussion_r1521908477
##########
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:
Also, it's worth noting that currently only ScalarFunctions appear in
Expressions and so they're the only ones where expression simplification might
happen
--
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]