-
Notifications
You must be signed in to change notification settings - Fork 232
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 LEAD/LAG failures in Spark 3.1.1 #1813
Conversation
Fixes class-loader related failures of LEAD/LAG operators, which caused errors like: ``` : java.lang.VerifyError: Bad type on operand stack Exception Details: Location: com/nvidia/spark/rapids/OffsetWindowFunctionMeta.<init>(Lorg/apache/spark/sql/catalyst/expressions/OffsetWindowFunction;Lcom/nvidia/spark/rapids/RapidsConf;Lscala/Option;Lcom/nvidia/spark/rapids/ConfKeysAndIncompat;)V @11: invokespecial Reason: Type 'org/apache/spark/sql/catalyst/expressions/OffsetWindowFunction' (current frame, stack[1]) is not assignable to 'org/apache/spark/sql/catalyst/expressions/Expression' ``` Also corrects for the reversal in offset semantics for LAG() expressions in Spark 3.1.1, causing `Lag.offset` to be negative. Signed-off-by: Mithun RK <mythrocks@gmail.com>
...park311/src/main/scala/com/nvidia/spark/rapids/shims/spark311/OffsetWindowFunctionMeta.scala
Outdated
Show resolved
Hide resolved
shims/spark311/src/main/scala/com/nvidia/spark/rapids/shims/spark311/Spark311Shims.scala
Outdated
Show resolved
Hide resolved
...park311/src/main/scala/com/nvidia/spark/rapids/shims/spark311/OffsetWindowFunctionMeta.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Mithun RK <mythrocks@gmail.com>
At the risk of blowing this up a little, we might consider a couple of changes more:
|
Do it |
Hmm... I wonder if adding @revans2, is there a guarantee that |
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
...park311/src/main/scala/com/nvidia/spark/rapids/shims/spark311/OffsetWindowFunctionMeta.scala
Outdated
Show resolved
Hide resolved
Signed-off-by: Mithun RK <mythrocks@gmail.com>
Apologies for the delay. I have now added Could I please bother @gerashegalov and @revans2 to see if this is agreeable? |
build |
Thanks for the reviews, @revans2, @gerashegalov. |
* Fix LEAD/LAG failures in Spark 3.1.1 Fixes class-loader related failures of LEAD/LAG operators, which caused errors like: ``` : java.lang.VerifyError: Bad type on operand stack Exception Details: Location: com/nvidia/spark/rapids/OffsetWindowFunctionMeta.<init>(Lorg/apache/spark/sql/catalyst/expressions/OffsetWindowFunction;Lcom/nvidia/spark/rapids/RapidsConf;Lscala/Option;Lcom/nvidia/spark/rapids/ConfKeysAndIncompat;)V @11: invokespecial Reason: Type 'org/apache/spark/sql/catalyst/expressions/OffsetWindowFunction' (current frame, stack[1]) is not assignable to 'org/apache/spark/sql/catalyst/expressions/Expression' ``` Also corrects for the reversal in offset semantics for LAG() expressions in Spark 3.1.1, causing `Lag.offset` to be negative. Signed-off-by: Mithun RK <mythrocks@gmail.com> * Removed dead code. Signed-off-by: Mithun RK <mythrocks@gmail.com> * More specific error handling extracting literal offsets. * Offset checking for pre-3.1 Spark lead/lag window functions. Signed-off-by: Mithun RK <mythrocks@gmail.com> * Missing whitespace. * Added tagExprForGpu() for OffsetWindowFunctionMeta.
* Fix LEAD/LAG failures in Spark 3.1.1 Fixes class-loader related failures of LEAD/LAG operators, which caused errors like: ``` : java.lang.VerifyError: Bad type on operand stack Exception Details: Location: com/nvidia/spark/rapids/OffsetWindowFunctionMeta.<init>(Lorg/apache/spark/sql/catalyst/expressions/OffsetWindowFunction;Lcom/nvidia/spark/rapids/RapidsConf;Lscala/Option;Lcom/nvidia/spark/rapids/ConfKeysAndIncompat;)V @11: invokespecial Reason: Type 'org/apache/spark/sql/catalyst/expressions/OffsetWindowFunction' (current frame, stack[1]) is not assignable to 'org/apache/spark/sql/catalyst/expressions/Expression' ``` Also corrects for the reversal in offset semantics for LAG() expressions in Spark 3.1.1, causing `Lag.offset` to be negative. Signed-off-by: Mithun RK <mythrocks@gmail.com> * Removed dead code. Signed-off-by: Mithun RK <mythrocks@gmail.com> * More specific error handling extracting literal offsets. * Offset checking for pre-3.1 Spark lead/lag window functions. Signed-off-by: Mithun RK <mythrocks@gmail.com> * Missing whitespace. * Added tagExprForGpu() for OffsetWindowFunctionMeta.
Fixes #999.
Fixes class-loader related errors of LEAD/LAG operators, which caused test failures like:
Also corrects for the reversal in offset semantics for
LAG()
expressions in Spark 3.1.1, causingLag.offset
to be negative.Signed-off-by: Mithun RK mythrocks@gmail.com