andygrove commented on PR #3471:
URL: 
https://github.com/apache/datafusion-comet/pull/3471#issuecomment-3880456381

   > Thanks @andygrove LGTM would you care to describe what tests this PR 
addresses?
   
   Generated by AI:
   
   The PR fixes Date32 +/- Int8/Int16/Int32 arithmetic which broke when 
upgrading to DataFusion 52, whose arrow-arith kernels only support Date32 +/- 
Interval types, not raw integers.                    
                                                                                
                                                                                
                                           
   The following tests would fail without this fix:                             
                                                                                
                                           
                                                                                
                                                                                
                                           
   CometExpressionSuite.scala                                                   
                                                                                
                                           
                                                                                
                                                                                
                                           
   - "date_add with int scalars" (line ~301) — SELECT _20 + CAST(2 as 
TINYINT/SHORT/INT)
   - "date_add with int arrays" (line ~335) — SELECT _20 + _2/_3/_4
   - "date_sub with int scalars" (line ~349) — SELECT _20 - CAST(2 as 
TINYINT/SHORT/INT)
   - "date_sub with int arrays" (line ~383) — SELECT _20 - _2/_3/_4
   
   SQL file-driven tests (via CometSqlFileTestSuite)
   
   - spark/src/test/resources/sql-tests/expressions/datetime/date_add.sql
   - spark/src/test/resources/sql-tests/expressions/datetime/date_sub.sql
   
   Fuzz tests (CometFuzzTemporalExpressions.scala)
   
   - "date arithmetic - date_add"
   - "date arithmetic - date_sub"
   
   All of these tests perform Date32 + Int or Date32 - Int operations, which 
DataFusion 52's arrow-arith kernels no longer support. The fix routes those 
operations to the Spark date_add/date_sub UDFs
   that handle integer types directly.


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