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

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   N/A
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in 
the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your 
changes and offer better suggestions for fixes.
   -->
   
   Improve testing.
   
   These new tests exposed some bugs:
   
   - [#3326](https://github.com/apache/datafusion-comet/issues/3326) — 
`space(-1)` causes native crash ("failed to round upto multiple of 64")
   - [#3327](https://github.com/apache/datafusion-comet/issues/3327) — 
`map_from_arrays(NULL, NULL)` causes native crash ("map key cannot be null")
   
   Both bugs have reproducing tests in the SQL files using the new `query 
ignore(...)` directive, so they'll be easy to re-enable once fixed.
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ### What's included
   
   - **~115 new SQL test files** in 
`spark/src/test/resources/sql-tests/expressions/` covering math, string, 
conditional, predicate, datetime, array, map, struct, JSON, aggregate, and cast 
expressions
   - **Two new query modes** in the test framework:
     - `query expect_fallback(reason)` — verifies both that the fallback reason 
matches AND results match Spark
     - `query ignore(reason)` — skips the query with a logged reason (for known 
bugs with issue links)
   - **Happy-path `_enabled` tests** for incompatible expressions with configs 
enabled (`caseConversion`, `regexp.allowIncompatible`, 
`InitCap.allowIncompatible`, `DateFormatClass.allowIncompatible`, 
`FromUnixTime.allowIncompatible`)
   - **Updates to 3 existing files**: `arithmetic.sql`, `bitwise.sql`, 
`datetime.sql` with additional edge cases
   
   ### Edge cases covered per expression
   
   - NULL inputs
   - Boundary values (MIN/MAX for int types, +/-Infinity, NaN for doubles)
   - Empty strings, empty collections
   - Type variety (int, long, float, double, decimal, string)
   - Special values (negative zero, overflow, division by zero)
   
   ## How are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are 
they covered by existing tests)?
   -->
   


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