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

   ## Which issue does this PR close?
   
   Closes #5075.
   
   ## Rationale for this change
   
   `DecimalPrecision.promote` currently derives `nullOnOverflow` from the live 
session ANSI setting. Spark expressions capture their own evaluation mode, and 
one expression tree can contain mixed modes, such as a `TRY` operation nested 
inside an ANSI expression. Each generated `CheckOverflow` wrapper must 
therefore follow the evaluation mode of the arithmetic expression it guards.
   
   ## What changes are included in this PR?
   
   - Remove the session-derived `nullOnOverflow` argument from 
`DecimalPrecision.promote`.
   - Derive `nullOnOverflow` from each decimal arithmetic node's evaluation 
mode.
   - Add a Spark 4.1 regression test that verifies nested ANSI and TRY 
expressions serialize with independent overflow behavior.
   
   ## How are these changes tested?
   
   - `make core`
   - `./mvnw test -Pspark-4.1 -Dtest=none 
-Dsuites=org.apache.spark.sql.comet.CometDecimalArithmeticViewSuite 
-Dscalastyle.skip=true` (1 suite, 2 tests)
   - `./mvnw scalastyle:check -Pspark-4.1`
   - `./mvnw spotless:apply -Pspark-4.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