cloud-fan commented on a change in pull request #34494:
URL: https://github.com/apache/spark/pull/34494#discussion_r750268691



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/IntervalUtils.scala
##########
@@ -1253,4 +1255,131 @@ object IntervalUtils {
     }
     intervalString
   }
+
+  def byteAndShortToYearMonthInterval(v: Int, endField: Byte): Int = {

Review comment:
       I feel it's a bit overkill to add this method to avoid overflow check 
for byte and short, as these two types are rarely used and perf doesn't matter 
that much.
   
   I think we can just call `intToYearMonthInterval` for byte and short.




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