[
https://issues.apache.org/jira/browse/DRILL-4864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Serge Harnyk updated DRILL-4864:
--------------------------------
Attachment: jodatime_ansi.odt
> Add ANSI format for date/time functions
> ---------------------------------------
>
> Key: DRILL-4864
> URL: https://issues.apache.org/jira/browse/DRILL-4864
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.8.0
> Reporter: Serge Harnyk
> Assignee: Serge Harnyk
> Fix For: 1.9.0
>
> Attachments: jodatime_ansi.odt
>
>
> The TO_DATE() is exposing the Joda string formatting conventions into the SQL
> layer. This is not following SQL conventions used by ANSI and many other
> database engines on the market.
> Add new UDF "ansi_to_joda(string1, string2)", that takes string that
> represents ANSI datetime format and returns string that represents equal Joda
> format.
> Add new session option "drill.exec.fn.to_date_format" that can be one of two
> values - "JODA"(default) and "ANSI".
> If option is set to "JODA" queries with to_date() function would work in
> usual way.
> If option is set to "ANSI" second argument would be wrapped with
> ansi_to_joda() function, that allows user to use ANSI datetime format
> Wrapping is used in to_date(), to_time() and to_timestamp() functions.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)