yaooqinn commented on a change in pull request #26491: [SPARK-29870][SQL] Unify 
the logic of multi-units interval string to CalendarInterval
URL: https://github.com/apache/spark/pull/26491#discussion_r346857773
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/IntervalUtils.scala
 ##########
 @@ -482,13 +409,19 @@ object IntervalUtils {
       }
     }
 
+    def currentWord: UTF8String = {
+      val strings = s.split(UTF8String.blankString(1), -1)
+      val lenLeft = s.substring(i, 
s.numBytes()).split(UTF8String.blankString(1), -1).length
 
 Review comment:
   still use `UTF8String` here, because the trim here in `val s = 
input.trim.toLowerCase` does handle '\n' '\t' ..., If we use `toString` here, 
we need to additional logic to avoid `ArrayIndexOutOfBoundsException `

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to