vranes commented on code in PR #59239:
URL: https://github.com/apache/spark/pull/59239#discussion_r4195729732


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/BinByExec.scala:
##########
@@ -122,7 +122,8 @@ case class BinByExec(
             } else if (rs == re) {
               val (k, binStart) = 
DateTimeUtils.timeBucketFromTimestampDTInterval(width, rs, origin,
                 zone)
-              val binEnd = DateTimeUtils.timeBucketFromIndexDTInterval(width, 
k + 1, origin, zone)
+              val nextK = MathUtils.addExact(k, 1L)
+              val binEnd = DateTimeUtils.timeBucketFromIndexDTInterval(width, 
nextK, origin, zone)

Review Comment:
   Done, I added binByOverflowError (DATETIME_OVERFLOW), and wrapped errors in 
that.



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