Smallfu666 commented on issue #10134:
URL: https://github.com/apache/gluten/issues/10134#issuecomment-5083002678
Hi @philo-he, I reproduced a narrow remaining part of this tracker on
current main (`8b701473f4654e7eb05335b0529bad9327db8b3`) with Spark 4.0/4.1 and
ANSI fallback disabled.
For `SELECT 2147483647 + 1`, the expression is executed by
`ProjectExecTransformer` (native Velox execution confirmed via `Top-level
Expression: checked_add(2147483647:INTEGER, 1:INTEGER)`), but the exception
cause chain is:
```
org.apache.spark.SparkException
-> org.apache.gluten.exception.GlutenException
-> org.apache.gluten.exception.GlutenException
```
Vanilla Spark exposes an `ArithmeticException` (or its Spark subclass) in
the cause chain. Gluten currently maps every native `std::exception` to
`GlutenException` via `JNI_METHOD_END` in `cpp/core/jni/JniError.h`, so the
existing Spark 4.x test only intercepting the outer `SparkException` does not
detect this mismatch.
Would you prefer a separate sub-issue for a narrowly scoped fix that maps
only Velox `ARITHMETIC_ERROR` to Java `ArithmeticException`, while preserving
`GlutenException` for all other errors? I would cover Spark 4.0/4.1, ANSI
on/off, TRY semantics, cause-chain type, and native offload.
Confirmed reproduction on both Spark 4.0 and 4.1 with the same exception
chain. This is only about the exception class mapping — I am not claiming the
full 24-item WRONG_EXCEPTION list from historical PR #11975 still exists on
current main.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]