ZhangHuiGui commented on code in PR #40608:
URL: https://github.com/apache/arrow/pull/40608#discussion_r1527411408
##########
cpp/src/arrow/compute/expression.cc:
##########
@@ -845,7 +845,7 @@ Result<Expression> FoldConstants(Expression expr) {
std::move(expr), [](Expression expr) { return expr; },
[](Expression expr, ...) -> Result<Expression> {
auto call = CallNotNull(expr);
- if (call->function->is_impure()) return expr;
+ if (!call->function->is_pure()) return expr;
Review Comment:
The syntax seems to be more intuitive. The previous modification considered
that the call of impure expression requires special processing, and only the
impure itself is used.
##########
docs/source/cpp/compute.rst:
##########
@@ -343,7 +343,7 @@ equivalents above and reflects how they are implemented
internally.
+-------------------------+---------+------------------------------------+------------------------+----------------------------------+-----------+
| hash_count | Unary | Any |
Int64 | :struct:`CountOptions` | \(2) |
+-------------------------+---------+------------------------------------+------------------------+----------------------------------+-----------+
-| hash_count_all | Unary | |
Int64 | | |
+| hash_count_all | Nullary | |
Int64 | | |
Review Comment:
You're right. What i saw is that hash_count_all's constructor use unary, but
it's unnecessary.
--
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]