rich7420 opened a new pull request, #6650:
URL: https://github.com/apache/datafusion-comet/pull/6650

   ## Which issue does this PR close?
   
   Closes #6617.
   
   ## Rationale for this change
   
   A SQL fixture using `expect_error(DIVIDE_BY_ZERO)` can pass after falling 
back to Spark, and its substring comparison cannot detect an error-class 
mismatch. Error-parity fixtures need the same execution and structured-error 
checks as the Scala suites.
   
   ## What changes are included in this PR?
   
   Add `query expect_error_class(ERROR_CLASS)` by calling the existing 
`checkSparkError` helper. It checks planned Comet operators, the exact expected 
error class, exception-class and SQLSTATE parity, and the absence of 
`CometNativeException` in both cause chains.
   
   Malformed directives fail with source file and line information. The new 
mode can serve as a sentinel for codegen fixtures containing legacy 
`expect_error`; legacy message-only semantics are documented and preserved. 
Query-context comparisons remain in Scala.
   
   ## How are these changes tested?
   
   Local parser and focused SQL-runner tests: 22/22 passed on each of Spark 
3.4, 3.5, 4.0, 4.1 and 4.2, with no aborted, canceled or ignored tests in the 
successful runs. The tests cover invalid directives, Spark fallback, 
substring-only classes, successful queries, both codegen-sentinel preflight 
outcomes, and column-backed divide/cast/array errors.
   
   Spark 3.5 also passes strict-warning compilation. Spotless, Scalastyle and 
Apache RAT pass. Native was built from the same main revision used by this 
branch. Two additional local repeats initially aborted during Spark startup 
with a socket-permission error; unchanged direct Maven retries passed.
   


-- 
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]

Reply via email to