You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2019/11/18 07:51:00 UTC

[jira] [Assigned] (SPARK-29870) Unify the logic of multi-units interval string to CalendarInterval

     [ https://issues.apache.org/jira/browse/SPARK-29870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan reassigned SPARK-29870:
-----------------------------------

    Assignee: Kent Yao

> 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
>            Assignee: 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org