[ https://issues.apache.org/jira/browse/SPARK-29870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16972992#comment-16972992 ]
Kent Yao commented on SPARK-29870: ---------------------------------- working on this > Unify the logic of multi-units interval string to CalendarInterval > ------------------------------------------------------------------ > > Key: SPARK-29870 > URL: https://issues.apache.org/jira/browse/SPARK-29870 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.0.0 > Reporter: Kent Yao > Priority: Major > > We now have two different implementation for multi-units interval strings to > CalendarInterval type values. > One is used to covert interval string literals to CalendarInterval. This > approach will re-delegate the interval string to spark parser which handles > the string as a `singleInterval` -> `multiUnitsInterval` -> eventually call > `IntervalUtils.fromUnitStrings` > The other is used in `Cast`, which eventually calls > `IntervalUtils.stringToInterval`. This approach is ~10 times faster than the > other. > We should unify these two for better performance and simple logic. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org