MaxGekk commented on a change in pull request #26662: [SPARK-30026][SQL] Whitespaces can be identified as delimiters in interval string URL: https://github.com/apache/spark/pull/26662#discussion_r350570074
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/IntervalUtils.scala ########## @@ -464,14 +462,17 @@ object IntervalUtils { if (input == null) { throwIAE("interval string cannot be null") } - // scalastyle:off caselocale .toLowerCase - val s = input.trimAll().toLowerCase - // scalastyle:on - val bytes = s.getBytes - if (bytes.isEmpty) { + val strs = input.trimAll().toLowerCase().split(UTF8String.fromString("interval\\s+"), -1) Review comment: For 9 units from 1726 -> 2618. This is slowing down by 50% which is significant. Is it possible to implement the same without regexps and split? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org