Skip to content
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

Filter out the nulls after slicing the batches. #2447

Merged
merged 5 commits into from
May 20, 2021

Conversation

firestarman
Copy link
Collaborator

@firestarman firestarman commented May 19, 2021

This PR is to fix the NPE in GpuShuffleExchange by filtering out the nulls after slicing the batches for GpuRangePartitioner and GpuSinglePartitioning. Just like what the GpuHashPartitioning does here.

The root cause of this NPE is the batch array returned from the method sliceInternalGpuOrCpu may contain nulls that generated by the function 'sliceBatch' for the corner case of empty batch (row number is 0). So even a single batch is expected, we still need to filter out the null.

Closes #2421

Signed-off-by: Firestarman firestarmanllc@gmail.com

Signed-off-by: Firestarman <firestarmanllc@gmail.com>
@pxLi pxLi added the bug Something isn't working label May 19, 2021
@firestarman
Copy link
Collaborator Author

build

Signed-off-by: Firestarman <firestarmanllc@gmail.com>
@firestarman
Copy link
Collaborator Author

build

@firestarman firestarman marked this pull request as draft May 19, 2021 07:16
Signed-off-by: Firestarman <firestarmanllc@gmail.com>
@firestarman firestarman marked this pull request as ready for review May 19, 2021 07:46
@firestarman
Copy link
Collaborator Author

build

@firestarman firestarman marked this pull request as draft May 19, 2021 08:47
@firestarman
Copy link
Collaborator Author

firestarman commented May 19, 2021

I converted the PR to draft, because I am not sure whether the linked bug is reproduceable on branch-21.06 (it was 0.6 before), which is the base branch of the PR.

I tried several times locally but can not get the NPE.

Copy link
Collaborator

@revans2 revans2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if it is simple, and only if it is simple, can we get a test that causes this to happen more regularly?

@firestarman firestarman marked this pull request as ready for review May 20, 2021 01:56
@firestarman
Copy link
Collaborator Author

Thanks @viadea for the verification on branch-21.06.
I am going to merge this PR since it works.

@firestarman firestarman merged commit 2b781d8 into NVIDIA:branch-21.06 May 20, 2021
@firestarman firestarman deleted the fix-exchange-NPE branch May 20, 2021 01:59
nartal1 pushed a commit to nartal1/spark-rapids that referenced this pull request Jun 9, 2021
* Filter out the nulls after slicing the batches.

Signed-off-by: Firestarman <firestarmanllc@gmail.com>
nartal1 pushed a commit to nartal1/spark-rapids that referenced this pull request Jun 9, 2021
* Filter out the nulls after slicing the batches.

Signed-off-by: Firestarman <firestarmanllc@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] NPE when running mapInPandas Pandas UDF in 0.5GA
5 participants