andygrove opened a new issue, #5076:
URL: https://github.com/apache/datafusion-comet/issues/5076

   ### What is the problem the feature request solves?
   
   An ANSI-mode audit against Spark 4.1.1 found several test-coverage gaps 
around ANSI behavior. Closing them locks in the behavior that is already 
correct and captures the known divergences as regression tests.
   
   **Stale disabled tests to re-enable:**
   
   - `spark/src/test/resources/sql-tests/expressions/array/element_at_ansi.sql` 
and `array/get_array_item_ansi.sql` are entirely `query ignore(#3375)` with 
comments claiming "Comet throws: different error message". #3375 is closed: the 
error-message work merged (native `GetArrayItem` re-enabled shortly after), and 
`CometArrayExpressionSuite` now asserts exact Spark message parity for both 
expressions. These files should be un-ignored.
   
   **Missing ANSI SQL file tests** (compare the existing `math/abs_ansi.sql`, 
`math/arithmetic_ansi.sql`, `url/parse_url_ansi.sql` pattern):
   
   - `round`: no ANSI case at all; also no integral negative-scale overflow 
case in any mode.
   - `conv`: no ANSI overflow case (e.g. `conv('FFFFFFFFFFFFFFFFF', 16, 10)` 
throws under ANSI).
   - `elt`: no out-of-range index case, no ANSI config.
   
   **Specific untested inputs surfaced by the audit** (each is the repro for a 
filed bug; add as `query ignore(<issue-url>)` until fixed, then un-ignore):
   
   - `Long.MinValue div -1` under ANSI (IntegralDivide overflow).
   - `CAST(1.0 AS DOUBLE) % CAST(0.0 AS DOUBLE)` under ANSI (float remainder by 
zero).
   - `CAST(true AS DECIMAL(1,1))` in legacy/try mode (boolean-to-decimal 
overflow).
   - `round(5000000000000000000L, -19)` in both modes.
   
   **Assertion strength:** several suites assert only on message substrings, 
which is why wrong-exception-type divergences pass today (decimal div-by-zero, 
next_day, make_date, decimal-to-decimal cast). Where the error class is 
expected to match, assert on the exception type / `getCondition()` rather than 
substrings, and remove the decimal-to-decimal special case at 
`CometCastSuite.scala:2402-2405` once the underlying issue is fixed.
   
   ### Additional context
   
   Found by an ANSI-mode audit of all native expressions against Spark 4.1.1.
   


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