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

   ## Describe the bug
   
   Native make_interval delegates to DataFusion SparkMakeInterval. Its seconds 
argument is coerced from Spark Decimal(18,6) to Float64 and its time component 
is accumulated as i64 nanoseconds. This creates two Spark compatibility gaps:
   
   - Float64 coercion can lose microsecond precision.
   - Nanosecond accumulation overflows for seconds values that fit in Spark i64 
microseconds.
   
   ## Steps to reproduce
   
   ```sql
   SELECT make_interval(0, 0, 0, 0, 0, 0, 999999999.000001);
   SELECT make_interval(1, 2, 3, 4, 0, 0, 123456789012.123456);
   ```
   
   For the first query, native execution loses one microsecond. For the second, 
native execution returns NULL in non-ANSI mode or throws in ANSI mode, while 
Spark returns a valid interval.
   
   ## Expected behavior
   
   Native make_interval should preserve Decimal(18,6) microsecond precision and 
support every seconds value Spark can represent.
   
   ## Additional context
   
   Found while reviewing #5039. Until this is fixed, CometMakeInterval is 
marked Incompatible by default and the native path requires explicit opt-in.
   
   Review context: 
https://github.com/apache/datafusion-comet/pull/5039#discussion_r3659501474


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