ZhangHuiGui commented on code in PR #40688:
URL: https://github.com/apache/arrow/pull/40688#discussion_r1541279389
##########
cpp/src/arrow/compute/expression.cc:
##########
@@ -874,7 +874,7 @@ Result<Expression> FoldConstants(Expression expr) {
}
}
- if (call->function_name == "and_kleene") {
+ if (call->function_name == "and_kleene" || call->function_name ==
"and") {
Review Comment:
> These are not correct. The SQL logical operators `AND` and `OR` correspond
to `and_kleene` and `or_kleene`, whereas `and(false, null) -> null`.
Yes, you're right. `OR` is same with `or_kleene`.
> I'm not sure the non-Kleene logical functions are used enough to warrant
special case optimizations
Yes, SQL logical operators should do these things by their own sql-optimizer
with sql-standard grammar. And the kleene logical functions seems enough for
other compute operators?
--
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]