andygrove commented on code in PR #4338:
URL: https://github.com/apache/datafusion-comet/pull/4338#discussion_r3274882204


##########
spark/src/main/scala/org/apache/comet/serde/datetime.scala:
##########
@@ -413,6 +413,8 @@ object CometNextDay extends 
CometScalarFunction[NextDay]("next_day")
 
 object CometMakeDate extends CometScalarFunction[MakeDate]("make_date")
 
+object CometMakeDTInterval extends 
CometScalarFunction[MakeDTInterval]("make_dt_interval")

Review Comment:
   Could you implement `getSupportLevel` and mark this as incompatible. Also, 
we need `getIncompatReasons` so we generate documentation. 
   
   My AI review helper tells me that Spark's 
`IntervalUtils.makeDayTimeInterval` uses `Math.addExact` / `Math.multiplyExact` 
and always throws on overflow:
   
   ```scala
     catch {
       case _: ArithmeticException =>
         throw 
QueryExecutionErrors.withoutSuggestionIntervalArithmeticOverflowError(context)
     }
   ```
   The upstream `SparkMakeDtInterval` kernel uses `checked_mul` / `checked_add` 
and silently returns `NULL` on overflow. Inputs that throw 
`INTERVAL_ARITHMETIC_OVERFLOW` in Spark will
     produce a `NULL` row in Comet.
   
   Could you verify whether this is true or not? If it is then we can just mark 
it incompatible for now and file an upstream issue against the datafusion repo.



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