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

Fix childExprs list for GpuWindowExpression, for Spark 3.1.x. #2944

Merged

Conversation

mythrocks
Copy link
Collaborator

@mythrocks mythrocks commented Jul 16, 2021

Fixes #2939.

When the type-checking for expressions in RapidsMeta was changed in #2888 (i.e. commit 1a09322),
OffsetWindowFunctionMeta was modified to include input, offset, and default expressions among
its childExprs.
Unfortunately, the commit neglected to replicate that change in Spark311Shims OffsetWindowFunctionMeta.

The error manifests as a failure to do type-checks for LEAD()/LAG() window functions, with the message:
java.lang.AssertionError: assertion failed: Lead expected at least 3 but found 0.

This commit should remedy the situation, and allow LEAD()/LAG() to function correctly.

@mythrocks mythrocks self-assigned this Jul 16, 2021
@mythrocks mythrocks added the P0 Must have for release label Jul 16, 2021
@mythrocks mythrocks requested a review from sperlingxx July 16, 2021 02:43
Fixes NVIDIA#2939.

When the type-checking for expressions in `RapidsMeta` was changed in NVIDIA#2888 (i.e. commit 1a09322),
`OffsetWindowFunctionMeta` was modified to include `input`, `offset`, and `default` expressions among
its `childExprs`.
Unfortunately, the commit neglected to replicate that change in `Spark311Shims` `OffsetWindowFunctionMeta`.

The error manifests as a failure to do type-checks for `LEAD()`/`LAG()` window functions, with the error:
`java.lang.AssertionError: assertion failed: Lead expected at least 3 but found 0`.

This commit should remedy the situation, and allow `LEAD()`/`LAG()` to function correctly.

Signed-off-by: Mithun RK <mythrocks@gmail.com>
@mythrocks mythrocks force-pushed the rapids-meta-for-lead-lag-3.1.x branch from 9aad52e to dcfe090 Compare July 16, 2021 03:15
@mythrocks
Copy link
Collaborator Author

build

Copy link
Collaborator

@sperlingxx sperlingxx left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot for this fix!

@pxLi pxLi added the bug Something isn't working label Jul 16, 2021
@sperlingxx sperlingxx merged commit 15fe52f into NVIDIA:branch-21.08 Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0 Must have for release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Window integration tests failing with Lead expected at least 3 but found 0
3 participants