You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…ions (#40396)
### Rationale for this change
Fix a problem when we call `SimplifyWithGuarantee` evaluate a function call which has no arguments.
### What changes are included in this PR?
Check empty for call.arguments before we evaluate arguments as literal in FoldConstants.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* GitHub Issue: #40395
Lead-authored-by: hugo.zhang <hugo.zhang@openpie.com>
Co-authored-by: ZhangHuiGui <hugo.zhang@openpie.com>
Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
Describe the bug, including details regarding any error messages, version, and platform.
Test codes like below:
Failed with
Invalid: ExecuteScalarExpression cannot Execute non-scalar expression Array[int64]
.It's caused by below codes in
FoldConstans
:https://github.com/apache/arrow/blob/49cdb0fe4e98fda19031c864a18e6156c6edbf3c/cpp/src/arrow/compute/expression.cc#L848C1-L856C10
We should not go into the all_of branch for the call has no arguments, but the
all_of
will return true for this situation.Component(s)
C++
The text was updated successfully, but these errors were encountered: