[CORE] Preserve original Java exceptions across JNI boundary#11943
Open
acvictor wants to merge 1 commit intoapache:mainfrom
Open
[CORE] Preserve original Java exceptions across JNI boundary#11943acvictor wants to merge 1 commit intoapache:mainfrom
acvictor wants to merge 1 commit intoapache:mainfrom
Conversation
|
Run Gluten Clickhouse CI on x86 |
9958a43 to
266012f
Compare
|
Run Gluten Clickhouse CI on x86 |
266012f to
b84d9e2
Compare
|
Run Gluten Clickhouse CI on x86 |
b84d9e2 to
fade37b
Compare
|
Run Gluten Clickhouse CI on x86 |
fade37b to
e85baad
Compare
|
Run Gluten Clickhouse CI on x86 |
e85baad to
4bc88d1
Compare
|
Run Gluten Clickhouse CI on x86 |
4bc88d1 to
eb426fb
Compare
|
Run Gluten Clickhouse CI on x86 |
eb426fb to
ab0959d
Compare
|
Run Gluten Clickhouse CI on x86 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are proposed in this pull request?
Java-side exceptions thrown during native callbacks (e.g.
SparkRuntimeException) were serialized to strings and rethrown asGlutenException, losing the original exception type and error condition codes.This PR adds
JniPendingExceptionto carry the originaljthrowablethrough C++ code, with a thread local fallback for when Velox's internal handlers (Driver.cpp CALL_OPERATOR, Expr.cpp) rewrap the C++ exception asVeloxRuntimeError.JNI_METHOD_ENDrecovers the original throwable from either path and rethrows it viaenv->Throw(). Java-sidetranslateException()is updated to preserve non GlutenException RuntimeExceptions.How was this patch tested?
Added UTs
Was this patch authored or co-authored using generative AI tooling?
Assisted-by: GitHub Copilot 1.0.18
Related issue #11912