-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-11990: [C++][Compute] Handle errors consistently #10098
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
Conversation
|
Turns out a much bigger change than I thought. Some hints maybe helpful to reviewer:
|
|
@github-actions crossbow submit -g nightly |
|
Revision: b7229010b5413113a6274f7ad6d6d9ad900ff2e8 Submitted crossbow builds: ursacomputing/crossbow @ actions-336 |
|
Benchmark diff of all computer kernels, skylake, clang-9. Removed tests with less than 10% deviation. |
|
MacOS CI error is due to LLVM-12 update, https://issues.apache.org/jira/browse/ARROW-12467 |
|
Here are the changes (only with |
|
I'm in support of this. Performance improvements notwithstanding, the main benefits IMHO are:
|
|
Out of curiosity, why does this improve performance? |
|
@nealrichardson Not sure, probably it makes things easier for the compiler. |
|
@nealrichardson In the realm of wild guesses I would investigate before taking much stock in, a change like this... ...changes from setting a variable on a class (that variable could then potentially be read in a lot of different places) to an out parameter (which can only be seen by the caller). By reducing the visible scope of the variable you are writing too you increase the chance the compiler decides that no one else needs to see the change and it can keep it in a register instead of writing it out to RAM somewhere. |
|
Rebased and fixed merge conflicts. |
|
MinGW32 python test timeout looks a spurious issue happens occasionally. |
bkietz
left a comment
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.
Thanks a lot for this cleanup, looks great!
Two minor nits:
Arrow handles errors by returning Status/Result. But in compute kernels, errors are populated in KernelContext.status. This is not consistent, and updating KernelContext.status is not thread safe. This patch removes KernelContext.status and returns kernel errors as Status/Result.
|
RTools CI failure looks not related. @nealrichardson |
|
Really a nice improvement, thank you! |
|
I do think the RTools failures are unrelated (I see them on other PRs), so will merge. |
|
FTR the R failure is This is because the 4.0.0 release just his CRAN, and apparently we have not bumped the version numbers post-release on master yet. @kszucs? |
Arrow handles errors by returning Status/Result. But in compute kernels,
errors are populated in KernelContext.status. This is not consistent,
and updating KernelContext.status is not thread safe.
This patch removes KernelContext.status and returns kernel errors as
Status/Result.
See big performance improvement for arithmetic kernels, especially the
checked version (up to 4x).
Also see ~50% drops from some filter kernels. Will investigate deeper
as follow up task.