peterxcli opened a new pull request, #5167: URL: https://github.com/apache/datafusion-comet/pull/5167
## Which issue does this PR close? Closes #5073. ## Rationale for this change Under ANSI mode, native `next_day` and `make_date` return generic DataFusion execution errors. Those bypass Comet's structured `SparkError` conversion at the JNI boundary and surface as `CometNativeException`, losing Spark's exception class, error class, and SQLSTATE. ## What changes are included in this PR? - Add typed `IllegalDayOfWeek` and `DatetimeFieldOutOfBounds` Spark errors and emit them from the native functions. - Convert the errors through the version-specific Spark shims, preserving Spark 3.x legacy errors and Spark 4.x structured errors. - Add an end-to-end regression that verifies native execution and matches Spark's exception class, error class, and SQLSTATE without `CometNativeException`. - Remove the resolved compatibility notes and correct the Spark-version notes in the existing ANSI SQL fixtures. ## How are these changes tested? - `make core` - Focused `CometTemporalExpressionSuite` regression on Spark 3.4, 3.5, 4.0, 4.1, and 4.2: `next_day and make_date ANSI errors match Spark exceptions` - `cargo fmt --manifest-path native/Cargo.toml --all -- --check` - Maven Spotless and Scalastyle checks -- 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]
