-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-39860: [C++] Expression ExecuteScalarExpression execute empty args function with a wrong result #39908
Conversation
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format?
or
In the case of PARQUET issues on JIRA the title also supports:
See also: |
|
exec_context->func_registry()->GetFunction("random")); | ||
ASSERT_OK_AND_ASSIGN(Datum expected, | ||
function->Execute(input, &random_options, exec_context)); | ||
AssertDatumsEqual(actual, expected, /*verbose=*/true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check the output length == 10 explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit fd69d30. There were 2 benchmark results with an error:
There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
…y args function with a wrong result (apache#39908) ### Rationale for this change Try to fix apache#39860. ### What changes are included in this PR? Deal with the call->arguments.size() == 0's condition in ExecuteScalarExpression when we call some functions has no arguments, like (random, hash_count ...). ### Are these changes tested? Yes ### Are there any user-facing changes? No. * Closes: apache#39860 Lead-authored-by: hugo.zhang <hugo.zhang@openpie.com> Co-authored-by: 张回归 <zhanghuigui@zhanghuiguideMacBook-Pro-1681.local> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
… function with a wrong result (#39908) ### Rationale for this change Try to fix #39860. ### What changes are included in this PR? Deal with the call->arguments.size() == 0's condition in ExecuteScalarExpression when we call some functions has no arguments, like (random, hash_count ...). ### Are these changes tested? Yes ### Are there any user-facing changes? No. * Closes: #39860 Lead-authored-by: hugo.zhang <hugo.zhang@openpie.com> Co-authored-by: 张回归 <zhanghuigui@zhanghuiguideMacBook-Pro-1681.local> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
…y args function with a wrong result (apache#39908) ### Rationale for this change Try to fix apache#39860. ### What changes are included in this PR? Deal with the call->arguments.size() == 0's condition in ExecuteScalarExpression when we call some functions has no arguments, like (random, hash_count ...). ### Are these changes tested? Yes ### Are there any user-facing changes? No. * Closes: apache#39860 Lead-authored-by: hugo.zhang <hugo.zhang@openpie.com> Co-authored-by: 张回归 <zhanghuigui@zhanghuiguideMacBook-Pro-1681.local> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
…y args function with a wrong result (apache#39908) Try to fix apache#39860. Deal with the call->arguments.size() == 0's condition in ExecuteScalarExpression when we call some functions has no arguments, like (random, hash_count ...). Yes No. * Closes: apache#39860 Lead-authored-by: hugo.zhang <hugo.zhang@openpie.com> Co-authored-by: 张回归 <zhanghuigui@zhanghuiguideMacBook-Pro-1681.local> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
…y args function with a wrong result (apache#39908) ### Rationale for this change Try to fix apache#39860. ### What changes are included in this PR? Deal with the call->arguments.size() == 0's condition in ExecuteScalarExpression when we call some functions has no arguments, like (random, hash_count ...). ### Are these changes tested? Yes ### Are there any user-facing changes? No. * Closes: apache#39860 Lead-authored-by: hugo.zhang <hugo.zhang@openpie.com> Co-authored-by: 张回归 <zhanghuigui@zhanghuiguideMacBook-Pro-1681.local> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
Rationale for this change
Try to fix #39860.
What changes are included in this PR?
Deal with the call->arguments.size() == 0's condition in ExecuteScalarExpression when we call some functions
has no arguments, like (random, hash_count ...).
Are these changes tested?
Yes
Are there any user-facing changes?
No.