andygrove opened a new issue, #4517:
URL: https://github.com/apache/datafusion-comet/issues/4517
When a `ScalaUDF` dispatched into the native plan (#4514) participates in an
expression that raises a divide-by-zero under ANSI mode (e.g. `1/udf(a)`), the
error surfaces as `org.apache.comet.CometNativeException` ("DivideByZero")
instead of the Spark `org.apache.spark.SparkArithmeticException` with error
class `DIVIDE_BY_ZERO`. DataFusion wraps the typed error so the JNI bridge
cannot downcast it back to the matching Spark exception.
This is observable in Spark's `SQLQueryTestSuite` golden test
`udf/postgreSQL/udf-select_having.sql` (query `SELECT 1 AS one FROM test_having
WHERE 1/udf(a) = 1 HAVING 1 < 2`). Same error category, different surface.
Follow-on from #4514. We should preserve the typed Spark exception
(exception class plus error class) end to end so native evaluation matches
Spark's ANSI error behavior.
--
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]