mbutrovich commented on code in PR #4541:
URL: https://github.com/apache/datafusion-comet/pull/4541#discussion_r3507283745


##########
spark/src/test/resources/sql-tests/expressions/datetime/make_dt_interval.sql:
##########
@@ -0,0 +1,35 @@
+-- Licensed to the Apache Software Foundation (ASF) under one

Review Comment:
   The coverage of column, literal, default, negative, and null inputs is good, 
and using `checkSparkAnswerAndOperator` (the default `query` mode) correctly 
asserts native execution and exercises the interval read-back path.
   
   One gap worth filling: overflow. `make_ym_interval` computes `years * 12 + 
months` through `IntervalUtils.makeYearMonthInterval`, which uses exact 
arithmetic and throws `ARITHMETIC_OVERFLOW` unconditionally (not ANSI-gated); 
`make_dt_interval` overflows its int64 microsecond total similarly. Since these 
route through the codegen dispatcher (Spark's own `doGenCode`), an overflow 
case is a good way to confirm the dispatched path propagates Spark's exception 
identically rather than diverging. Something like:
   
   ```sql
   query expect_error(ARITHMETIC_OVERFLOW)
   SELECT make_ym_interval(178956971, 0)
   ```
   
   Please confirm the exact error token the suite matches. The value `178956971 
* 12` exceeds `Int.MaxValue`, so both engines should raise the same overflow.



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