dwsmith1983 commented on code in PR #5864:
URL: https://github.com/apache/datafusion-comet/pull/5864#discussion_r3994615176


##########
spark/src/main/scala/org/apache/comet/serde/datetime.scala:
##########
@@ -997,6 +997,33 @@ object CometTimestampAdd extends 
CometCodegenDispatch[TimestampAdd]
 
 object CometTimestampDiff extends CometCodegenDispatch[TimestampDiff]
 
+// Date and timestamp interval arithmetic. `timestamp + day-time or calendar 
interval` resolves
+// to `TimeAdd` on Spark 3.4 through 4.0 and to `TimestampAddInterval` on 
4.1+, so that serde
+// lives in the version shims.
+object CometDateAddInterval extends CometCodegenDispatch[DateAddInterval]
+
+object CometDateAddYMInterval extends CometCodegenDispatch[DateAddYMInterval]
+
+object CometTimestampAddYMInterval extends 
CometCodegenDispatch[TimestampAddYMInterval]
+
+object CometSubtractDates extends CometCodegenDispatch[SubtractDates]
+
+object CometSubtractTimestamps extends 
CometCodegenDispatch[SubtractTimestamps] {
+  private val legacyIntervalReason =

Review Comment:
   Done. The reason string links #5279, and the comment above the branch says 
why this one declines where `CometMakeInterval` keeps dispatching: same 
`multiplyExact` limit, but `make_interval` only overflows on extreme arguments 
while `ts - ts` produces an arbitrary span from ordinary data, and legacy mode 
is off by default. It also says to remove the branch once #5279 carries 
`CalendarInterval` across losslessly.
   



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