[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2017-03-27 Thread Suresh Ollala (JIRA)

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

Suresh Ollala updated DRILL-4864:
-
Reviewer: Krystal  (was: Paul Rogers)

> 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: Serhii Harnyk
>Assignee: Serhii Harnyk
>  Labels: doc-impacting
> Fix For: 1.10.0
>
>
> 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 UDFs: 
> * sql_to_date(String, Format), 
> * sql_to_time(String, Format), 
> * sql_to_timestamp(String, Format)
> that requires Postgres datetime format.
> Table of supported Postgres patterns
> ||Pattern name||Postgres format   
> |Full name of day|day   
> |Day of year|ddd   
> |Day of month|dd
> |Day of week|d   
> |Name of month|month
> |Abr name of month|mon
> |Full era name|ee
> |Name of day|dy   
> |Time zone|tz   
> |Hour 12 |hh   
> |Hour 12 |hh12   
> |Hour 24|hh24
> |Minute of hour|mi  
> |Second of minute|ss   
> |Millisecond of minute|ms
> |Week of year|ww   
> |Month|mm   
> |Halfday am|am
> |Year   |   y   
> |ref.|
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html   |
> Table of acceptable Postgres pattern modifiers, which may be used in Format 
> string
> ||Description||Pattern||
> |fill mode (suppress padding blanks and zeroes)|fm |
> |fixed format global option (see usage notes)|fx |
> |translation mode (print localized day and month names based on 
> lc_messages)|tm |
> |spell mode (not yet implemented)|sp|
> |ref.|
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html|



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2017-02-13 Thread Serhii Harnyk (JIRA)

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

Serhii Harnyk updated DRILL-4864:
-
Labels: doc-impacting  (was: doc-impacting ready-to-commit)

> 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: Serhii Harnyk
>Assignee: Serhii Harnyk
>  Labels: doc-impacting
> Fix For: 1.10
>
>
> 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 UDFs: 
> * sql_to_date(String, Format), 
> * sql_to_time(String, Format), 
> * sql_to_timestamp(String, Format)
> that requires Postgres datetime format.
> Table of supported Postgres patterns
> ||Pattern name||Postgres format   
> |Full name of day|day   
> |Day of year|ddd   
> |Day of month|dd
> |Day of week|d   
> |Name of month|month
> |Abr name of month|mon
> |Full era name|ee
> |Name of day|dy   
> |Time zone|tz   
> |Hour 12 |hh   
> |Hour 12 |hh12   
> |Hour 24|hh24
> |Minute of hour|mi  
> |Second of minute|ss   
> |Millisecond of minute|ms
> |Week of year|ww   
> |Month|mm   
> |Halfday am|am
> |Year   |   y   
> |ref.|
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html   |
> Table of acceptable Postgres pattern modifiers, which may be used in Format 
> string
> ||Description||Pattern||
> |fill mode (suppress padding blanks and zeroes)|fm |
> |fixed format global option (see usage notes)|fx |
> |translation mode (print localized day and month names based on 
> lc_messages)|tm |
> |spell mode (not yet implemented)|sp|
> |ref.|
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html|



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2017-02-07 Thread Paul Rogers (JIRA)

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

Paul Rogers updated DRILL-4864:
---
   Labels: doc-impacting ready-to-commit  (was: doc-impacting)
Fix Version/s: (was: Future)
   1.10

> 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: Serhii Harnyk
>Assignee: Serhii Harnyk
>  Labels: doc-impacting, ready-to-commit
> Fix For: 1.10
>
>
> 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 UDFs: 
> * sql_to_date(String, Format), 
> * sql_to_time(String, Format), 
> * sql_to_timestamp(String, Format)
> that requires Postgres datetime format.
> Table of supported Postgres patterns
> ||Pattern name||Postgres format   
> |Full name of day|day   
> |Day of year|ddd   
> |Day of month|dd
> |Day of week|d   
> |Name of month|month
> |Abr name of month|mon
> |Full era name|ee
> |Name of day|dy   
> |Time zone|tz   
> |Hour 12 |hh   
> |Hour 12 |hh12   
> |Hour 24|hh24
> |Minute of hour|mi  
> |Second of minute|ss   
> |Millisecond of minute|ms
> |Week of year|ww   
> |Month|mm   
> |Halfday am|am
> |Year   |   y   
> |ref.|
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html   |
> Table of acceptable Postgres pattern modifiers, which may be used in Format 
> string
> ||Description||Pattern||
> |fill mode (suppress padding blanks and zeroes)|fm |
> |fixed format global option (see usage notes)|fx |
> |translation mode (print localized day and month names based on 
> lc_messages)|tm |
> |spell mode (not yet implemented)|sp|
> |ref.|
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html|



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-12-19 Thread Arina Ielchiieva (JIRA)

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

Arina Ielchiieva updated DRILL-4864:

Reviewer: Paul Rogers  (was: Dechang Gu)

> 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: Serhii Harnyk
>Assignee: Serhii Harnyk
>  Labels: doc-impacting
> Fix For: Future
>
>
> 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 UDFs: 
> * sql_to_date(String, Format), 
> * sql_to_time(String, Format), 
> * sql_to_timestamp(String, Format)
> that requires Postgres datetime format.
> Table of supported Postgres patterns
> ||Pattern name||Postgres format   
> |Full name of day|day   
> |Day of year|ddd   
> |Day of month|dd
> |Day of week|d   
> |Name of month|month
> |Abr name of month|mon
> |Full era name|ee
> |Name of day|dy   
> |Time zone|tz   
> |Hour 12 |hh   
> |Hour 12 |hh12   
> |Hour 24|hh24
> |Minute of hour|mi  
> |Second of minute|ss   
> |Millisecond of minute|ms
> |Week of year|ww   
> |Month|mm   
> |Halfday am|am
> |Year   |   y   
> |ref.|
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html   |
> Table of acceptable Postgres pattern modifiers, which may be used in Format 
> string
> ||Description||Pattern||
> |fill mode (suppress padding blanks and zeroes)|fm |
> |fixed format global option (see usage notes)|fx |
> |translation mode (print localized day and month names based on 
> lc_messages)|tm |
> |spell mode (not yet implemented)|sp|
> |ref.|
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html|



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-12-16 Thread Serhii Harnyk (JIRA)

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

Serhii Harnyk updated DRILL-4864:
-
Description: 
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 UDFs: 

* sql_to_date(String, Format), 
* sql_to_time(String, Format), 
* sql_to_timestamp(String, Format)

that requires Postgres datetime format.


Table of supported Postgres patterns
||Pattern name||Postgres format   
|Full name of day|day   
|Day of year|ddd   
|Day of month|dd
|Day of week|d   
|Name of month|month
|Abr name of month|mon
|Full era name|ee
|Name of day|dy   
|Time zone|tz   
|Hour 12 |hh   
|Hour 12 |hh12   
|Hour 24|hh24
|Minute of hour|mi  
|Second of minute|ss   
|Millisecond of minute|ms
|Week of year|ww   
|Month|mm   
|Halfday am|am
|Year   |   y   
|ref.|
https://www.postgresql.org/docs/8.2/static/functions-formatting.html   |


Table of acceptable Postgres pattern modifiers, which may be used in Format 
string
||Description||Pattern||
|fill mode (suppress padding blanks and zeroes)|fm |
|fixed format global option (see usage notes)|fx |
|translation mode (print localized day and month names based on 
lc_messages)|tm |
|spell mode (not yet implemented)|sp|
|ref.|
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|

  was:
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 UDFs: 

* sql_to_date(String, Format), 
* sql_to_time(String, Format), 
* sql_to_timestamp(String, Format)

that requires Postgres datetime format.


Table of supported Postgres patterns
||Pattern name||Postgres format   
|Full name of day|day   
|Day of year|ddd   
|Day of month|dd
|Day of week|d   
|Name of month|month
|Abr name of month|mon
|Full era name|ee
|Name of day|dy   
|Time zone|tz   
|Hour 12 |hh   
|Hour 12 |hh12   
|Hour 24|hh24
|Minute of hour|mi  
|Second of minute|ss   
|Millisecond of minute|ms
|Week of year|ww   
|Month|mm   
|Halfday am|am
|Year   |   y   
|ref.|
https://www.postgresql.org/docs/8.2/static/functions-formatting.html   




Table of acceptable Postgres pattern modifiers, which may be used in Format 
string
||Description||Pattern||
|fill mode (suppress padding blanks and zeroes)|fm |
|fixed format global option (see usage notes)|fx |
|translation mode (print localized day and month names based on 
lc_messages)|tm |
|spell mode (not yet implemented)|sp|
|ref.|
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|


> 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: Serhii Harnyk
>Assignee: Serhii Harnyk
>  Labels: doc-impacting
> Fix For: Future
>
>
> 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 UDFs: 
> * sql_to_date(String, Format), 
> * sql_to_time(String, Format), 
> * sql_to_timestamp(String, Format)
> that requires Postgres datetime format.
> Table of supported Postgres patterns
> ||Pattern name||Postgres format   
> |Full name of day|day   
> |Day of year|ddd   
> |Day of month|dd
> |Day of week|d   
> |Name of month|month
> |Abr name of month|mon
> |Full era name|ee
> |Name of day|dy   
> |Time zone|tz   
> |Hour 12 |hh   
> |Hour 12 |hh12   
> |Hour 24|hh24
> |Minute of hour|mi  
> |Second of minute|ss   
> |Millisecond of minute|ms
> |Week of year|ww   
> |Month|mm   
> |Halfday am|  

[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-12-16 Thread Serhii Harnyk (JIRA)

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

Serhii Harnyk updated DRILL-4864:
-
Description: 
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 UDFs: 

* sql_to_date(String, Format), 
* sql_to_time(String, Format), 
* sql_to_timestamp(String, Format)

that requires Postgres datetime format.


Table of supported Postgres patterns
||Pattern name||Postgres format   
|Full name of day|day   
|Day of year|ddd   
|Day of month|dd
|Day of week|d   
|Name of month|month
|Abr name of month|mon
|Full era name|ee
|Name of day|dy   
|Time zone|tz   
|Hour 12 |hh   
|Hour 12 |hh12   
|Hour 24|hh24
|Minute of hour|mi  
|Second of minute|ss   
|Millisecond of minute|ms
|Week of year|ww   
|Month|mm   
|Halfday am|am
|Year   |   y   
|ref.|
https://www.postgresql.org/docs/8.2/static/functions-formatting.html   




Table of acceptable Postgres pattern modifiers, which may be used in Format 
string
||Description||Pattern||
|fill mode (suppress padding blanks and zeroes)|fm |
|fixed format global option (see usage notes)|fx |
|translation mode (print localized day and month names based on 
lc_messages)|tm |
|spell mode (not yet implemented)|sp|
|ref.|
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|

  was:
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(string)", 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.
Table of joda and ansi patterns which may be replaced
||  Pattern name||  Ansi format ||  JodaTime format
|   Full name of day|   day |   
|   Day of year |   ddd |   D
|   Day of month|   dd  |   d
|   Day of week |   d   |   e
|   Name of month   |   month   |   
|   Abr name of month   |   mon |   MMM
|   Full era name   |   ee  |   G
|   Name of day |   dy  |   E
|   Time zone   |   tz  |   TZ
|   Hour 12 |   hh  |   h
|   Hour 12 |   hh12|   h
|   Hour 24 |   hh24|   H
|   Minute of hour  |   mi  |   m
|   Second of minute|   ss  |   s
|   Millisecond of minute   |   ms  |   S
|   Week of year|   ww  |   w
|   Month   |   mm  |   MM
|   Halfday am  |   am  |   aa
|   Halfday pm  |   pm  |   aa
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|   
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html |


Table of ansi pattern modifiers, which may be deleted from string
||  Description ||  Pattern ||
|   fill mode (suppress padding blanks and zeroes)  |   fm  |
|   fixed format global option (see usage notes)|   fx  |
|   translation mode (print localized day and month names based on 
lc_messages) |   tm  |
|   spell mode (not yet implemented)|   sp  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|


> 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: Serhii Harnyk
>Assignee: Serhii Harnyk
>  Labels: doc-impacting
> Fix For: Future
>
>
> The TO_DATE() is exposing the Joda string formatting conventions into the SQL 
> layer. This is not following SQL conventions used by 

[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-12-01 Thread Arina Ielchiieva (JIRA)

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

Arina Ielchiieva updated DRILL-4864:

Fix Version/s: (was: 1.9.0)
   Future

> 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: Serhii Harnyk
>Assignee: Serhii Harnyk
>  Labels: doc-impacting
> Fix For: Future
>
>
> 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(string)", 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.
> Table of joda and ansi patterns which may be replaced
> ||Pattern name||  Ansi format ||  JodaTime format
> | Full name of day|   day |   
> | Day of year |   ddd |   D
> | Day of month|   dd  |   d
> | Day of week |   d   |   e
> | Name of month   |   month   |   
> | Abr name of month   |   mon |   MMM
> | Full era name   |   ee  |   G
> | Name of day |   dy  |   E
> | Time zone   |   tz  |   TZ
> | Hour 12 |   hh  |   h
> | Hour 12 |   hh12|   h
> | Hour 24 |   hh24|   H
> | Minute of hour  |   mi  |   m
> | Second of minute|   ss  |   s
> | Millisecond of minute   |   ms  |   S
> | Week of year|   ww  |   w
> | Month   |   mm  |   MM
> | Halfday am  |   am  |   aa
> | Halfday pm  |   pm  |   aa
> | ref.|   
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html| 
>   
> http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html
>  |
> Table of ansi pattern modifiers, which may be deleted from string
> ||Description ||  Pattern ||
> | fill mode (suppress padding blanks and zeroes)  |   fm  |
> | fixed format global option (see usage notes)|   fx  |
> | translation mode (print localized day and month names based on 
> lc_messages) |   tm  |
> | spell mode (not yet implemented)|   sp  |
> | ref.|   
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html|



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-10-31 Thread Gautam Kumar Parai (JIRA)

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

Gautam Kumar Parai updated DRILL-4864:
--
Assignee: Serhii Harnyk  (was: Gautam Kumar Parai)

> 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: Serhii Harnyk
>Assignee: Serhii Harnyk
>  Labels: doc-impacting
> Fix For: 1.9.0
>
>
> 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(string)", 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.
> Table of joda and ansi patterns which may be replaced
> ||Pattern name||  Ansi format ||  JodaTime format
> | Full name of day|   day |   
> | Day of year |   ddd |   D
> | Day of month|   dd  |   d
> | Day of week |   d   |   e
> | Name of month   |   month   |   
> | Abr name of month   |   mon |   MMM
> | Full era name   |   ee  |   G
> | Name of day |   dy  |   E
> | Time zone   |   tz  |   TZ
> | Hour 12 |   hh  |   h
> | Hour 12 |   hh12|   h
> | Hour 24 |   hh24|   H
> | Minute of hour  |   mi  |   m
> | Second of minute|   ss  |   s
> | Millisecond of minute   |   ms  |   S
> | Week of year|   ww  |   w
> | Month   |   mm  |   MM
> | Halfday am  |   am  |   aa
> | Halfday pm  |   pm  |   aa
> | ref.|   
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html| 
>   
> http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html
>  |
> Table of ansi pattern modifiers, which may be deleted from string
> ||Description ||  Pattern ||
> | fill mode (suppress padding blanks and zeroes)  |   fm  |
> | fixed format global option (see usage notes)|   fx  |
> | translation mode (print localized day and month names based on 
> lc_messages) |   tm  |
> | spell mode (not yet implemented)|   sp  |
> | ref.|   
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html|



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-10-03 Thread Kunal Khatua (JIRA)

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

Kunal Khatua updated DRILL-4864:

Reviewer: Dechang Gu

> 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: Serhii Harnyk
>Assignee: Gautam Kumar Parai
>  Labels: doc-impacting
> Fix For: 1.9.0
>
>
> 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(string)", 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.
> Table of joda and ansi patterns which may be replaced
> ||Pattern name||  Ansi format ||  JodaTime format
> | Full name of day|   day |   
> | Day of year |   ddd |   D
> | Day of month|   dd  |   d
> | Day of week |   d   |   e
> | Name of month   |   month   |   
> | Abr name of month   |   mon |   MMM
> | Full era name   |   ee  |   G
> | Name of day |   dy  |   E
> | Time zone   |   tz  |   TZ
> | Hour 12 |   hh  |   h
> | Hour 12 |   hh12|   h
> | Hour 24 |   hh24|   H
> | Minute of hour  |   mi  |   m
> | Second of minute|   ss  |   s
> | Millisecond of minute   |   ms  |   S
> | Week of year|   ww  |   w
> | Month   |   mm  |   MM
> | Halfday am  |   am  |   aa
> | Halfday pm  |   pm  |   aa
> | ref.|   
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html| 
>   
> http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html
>  |
> Table of ansi pattern modifiers, which may be deleted from string
> ||Description ||  Pattern ||
> | fill mode (suppress padding blanks and zeroes)  |   fm  |
> | fixed format global option (see usage notes)|   fx  |
> | translation mode (print localized day and month names based on 
> lc_messages) |   tm  |
> | spell mode (not yet implemented)|   sp  |
> | ref.|   
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html|



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Arina Ielchiieva (JIRA)

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

Arina Ielchiieva updated DRILL-4864:

Labels: doc-impacting  (was: )

> 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
>  Labels: doc-impacting
> Fix For: 1.9.0
>
>
> 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(string)", 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.
> Table of joda and ansi patterns which may be replaced
> ||Pattern name||  Ansi format ||  JodaTime format
> | Full name of day|   day |   
> | Day of year |   ddd |   D
> | Day of month|   dd  |   d
> | Day of week |   d   |   e
> | Name of month   |   month   |   
> | Abr name of month   |   mon |   MMM
> | Full era name   |   ee  |   G
> | Name of day |   dy  |   E
> | Time zone   |   tz  |   TZ
> | Hour 12 |   hh  |   h
> | Hour 12 |   hh12|   h
> | Hour 24 |   hh24|   H
> | Minute of hour  |   mi  |   m
> | Second of minute|   ss  |   s
> | Millisecond of minute   |   ms  |   S
> | Week of year|   ww  |   w
> | Month   |   mm  |   MM
> | Halfday am  |   am  |   aa
> | Halfday pm  |   pm  |   aa
> | ref.|   
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html| 
>   
> http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html
>  |
> Table of ansi pattern modifiers, which may be deleted from string
> ||Description ||  Pattern ||
> | fill mode (suppress padding blanks and zeroes)  |   fm  |
> | fixed format global option (see usage notes)|   fx  |
> | translation mode (print localized day and month names based on 
> lc_messages) |   tm  |
> | spell mode (not yet implemented)|   sp  |
> | ref.|   
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html|



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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(string)", 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.
Table of joda and ansi patterns which may be replaced
||  Pattern name||  Ansi format ||  JodaTime format
|   Full name of day|   day |   
|   Day of year |   ddd |   D
|   Day of month|   dd  |   d
|   Day of week |   d   |   e
|   Name of month   |   month   |   
|   Abr name of month   |   mon |   MMM
|   Full era name   |   ee  |   G
|   Name of day |   dy  |   E
|   Time zone   |   tz  |   TZ
|   Hour 12 |   hh  |   h
|   Hour 12 |   hh12|   h
|   Hour 24 |   hh24|   H
|   Minute of hour  |   mi  |   m
|   Second of minute|   ss  |   s
|   Millisecond of minute   |   ms  |   S
|   Week of year|   ww  |   w
|   Month   |   mm  |   MM
|   Halfday am  |   am  |   aa
|   Halfday pm  |   pm  |   aa
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|   
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html |


Table of ansi pattern modifiers, which may be deleted from string
||  Description ||  Pattern ||
|   fill mode (suppress padding blanks and zeroes)  |   fm  |
|   fixed format global option (see usage notes)|   fx  |
|   translation mode (print localized day and month names based on 
lc_messages) |   tm  |
|   spell mode (not yet implemented)|   sp  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|

  was:
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(string)", 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.
Table of joda and ansi patterns which may be replaced
||  Pattern name||  Ansi format ||  JodaTime format ||
|   FULL NAME OF DAY|   day |   |
|   DAY OF YEAR |   ddd |   D   |
|   DAY OF MONTH|   dd  |   d   |
|   DAY OF WEEK |   d   |   e   |
|   NAME OF MONTH   |   month   |   |
|   ABR NAME OF MONTH   |   mon |   MMM |
|   FULL ERA NAME   |   ee  |   G   |
|   NAME OF DAY |   dy  |   E   |
|   TIME ZONE   |   tz  |   TZ  |
|   HOUR 12 |   hh  |   h   |
|   HOUR 12 |   hh12|   h   |
|   HOUR 24 |   hh24|   H   |
|   MINUTE OF HOUR  |   mi  |   m   |
|   SECOND OF MINUTE|   ss  |   s   |
|   MILLISECOND OF MINUTE   |   ms  |   S   |
|   WEEK OF YEAR|   ww  |   w   |
|   MONTH   |   mm  |   MM  |
|   HALFDAY AM  |   am  |   aa  |
|   HALFDAY PM  |   pm  |   aa  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|   
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html  
|

Table of ansi pattern modifiers, which 

[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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(string)", 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.
Table of joda and ansi patterns which may be replaced
||  Pattern name||  Ansi format ||  JodaTime format ||
|   FULL NAME OF DAY|   day |   |
|   DAY OF YEAR |   ddd |   D   |
|   DAY OF MONTH|   dd  |   d   |
|   DAY OF WEEK |   d   |   e   |
|   NAME OF MONTH   |   month   |   |
|   ABR NAME OF MONTH   |   mon |   MMM |
|   FULL ERA NAME   |   ee  |   G   |
|   NAME OF DAY |   dy  |   E   |
|   TIME ZONE   |   tz  |   TZ  |
|   HOUR 12 |   hh  |   h   |
|   HOUR 12 |   hh12|   h   |
|   HOUR 24 |   hh24|   H   |
|   MINUTE OF HOUR  |   mi  |   m   |
|   SECOND OF MINUTE|   ss  |   s   |
|   MILLISECOND OF MINUTE   |   ms  |   S   |
|   WEEK OF YEAR|   ww  |   w   |
|   MONTH   |   mm  |   MM  |
|   HALFDAY AM  |   am  |   aa  |
|   HALFDAY PM  |   pm  |   aa  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|   
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html  
|

Table of ansi pattern modifiers, which may be deleted from string
||  Description ||  Pattern ||
|   fill mode (suppress padding blanks and zeroes)  |   fm  |
|   fixed format global option (see usage notes)|   fx  |
|   translation mode (print localized day and month names based on 
lc_messages) |   tm  |
|   spell mode (not yet implemented)|   sp  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|

  was:
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(string)", 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.
Table of joda and ansi patterns which may be replaced
||  Pattern name||  Ansi format ||  JodaTime format ||
|   FULL NAME OF DAY|   day |   |
|   DAY OF YEAR |   ddd |   D   |
|   DAY OF MONTH|   dd  |   d   |
|   DAY OF WEEK |   d   |   e   |
|   NAME OF MONTH   |   month   |   |
|   ABR NAME OF MONTH   |   mon |   MMM |
|   FULL ERA NAME   |   ee  |   G   |
|   NAME OF DAY |   dy  |   E   |
|   TIME ZONE   |   tz  |   TZ  |
|   HOUR 12 |   hh  |   h   |
|   HOUR 12 |   hh12|   h   |
|   HOUR 24 |   hh24|   H   |
|   MINUTE OF HOUR  |   mi  |   m   |
|   SECOND OF MINUTE|   ss  |   s   |
|   MILLISECOND OF MINUTE   |   ms  |   S   |
|   WEEK OF YEAR|   ww  |   w   |
|   MONTH   |   mm  |   MM  |
|   HALFDAY AM  |   am  |   aa  |
|   HALFDAY PM  |   pm  |   aa  |
|   ref.|   

[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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(string)", 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.
Table of joda and ansi patterns which may be replaced
||  Pattern name||  Ansi format ||  JodaTime format ||
|   FULL NAME OF DAY|   day |   |
|   DAY OF YEAR |   ddd |   D   |
|   DAY OF MONTH|   dd  |   d   |
|   DAY OF WEEK |   d   |   e   |
|   NAME OF MONTH   |   month   |   |
|   ABR NAME OF MONTH   |   mon |   MMM |
|   FULL ERA NAME   |   ee  |   G   |
|   NAME OF DAY |   dy  |   E   |
|   TIME ZONE   |   tz  |   TZ  |
|   HOUR 12 |   hh  |   h   |
|   HOUR 12 |   hh12|   h   |
|   HOUR 24 |   hh24|   H   |
|   MINUTE OF HOUR  |   mi  |   m   |
|   SECOND OF MINUTE|   ss  |   s   |
|   MILLISECOND OF MINUTE   |   ms  |   S   |
|   WEEK OF YEAR|   ww  |   w   |
|   MONTH   |   mm  |   MM  |
|   HALFDAY AM  |   am  |   aa  |
|   HALFDAY PM  |   pm  |   aa  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|   
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html  
|

Table of ansi pattern modifiers, which may be deleted from string
||  Description ||  Pattern ||
|   fill mode (suppress padding blanks and zeroes)  |   FM  |
|   fixed format global option (see usage notes)|   FX  |
|   translation mode (print localized day and month names based on 
lc_messages) |   TM  |
|   spell mode (not yet implemented)|   SP  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|

  was:
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(string)", 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.
Table of joda and ansi patterns which may be replaced
||  Pattern name||  Ansi format ||  JodaTime format ||
|   FULL NAME OF DAY|   day |   |
|   DAY OF YEAR |   ddd |   D   |
|   DAY OF MONTH|   dd  |   d   |
|   DAY OF WEEK |   d   |   e   |
|   NAME OF MONTH   |   month   |   |
|   ABR NAME OF MONTH   |   mon |   MMM |
|   FULL ERA NAME   |   ee  |   G   |
|   NAME OF DAY |   dy  |   E   |
|   TIME ZONE   |   tz  |   TZ  |
|   HOUR 12 |   hh  |   h   |
|   HOUR 12 |   hh12|   h   |
|   HOUR 24 |   hh24|   H   |
|   MINUTE OF HOUR  |   mi  |   m   |
|   SECOND OF MINUTE|   ss  |   s   |
|   MILLISECOND OF MINUTE   |   ms  |   S   |
|   WEEK OF YEAR|   ww  |   w   |
|   MONTH   |   mm  |   MM  |
|   HALFDAY AM  |   am  |   aa  |
|   HALFDAY PM  |   pm  |   aa  |
|   ref.|   

[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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(string)", 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.
Table of joda and ansi patterns which may be replaced
||  Pattern name||  Ansi format ||  JodaTime format ||
|   FULL NAME OF DAY|   day |   |
|   DAY OF YEAR |   ddd |   D   |
|   DAY OF MONTH|   dd  |   d   |
|   DAY OF WEEK |   d   |   e   |
|   NAME OF MONTH   |   month   |   |
|   ABR NAME OF MONTH   |   mon |   MMM |
|   FULL ERA NAME   |   ee  |   G   |
|   NAME OF DAY |   dy  |   E   |
|   TIME ZONE   |   tz  |   TZ  |
|   HOUR 12 |   hh  |   h   |
|   HOUR 12 |   hh12|   h   |
|   HOUR 24 |   hh24|   H   |
|   MINUTE OF HOUR  |   mi  |   m   |
|   SECOND OF MINUTE|   ss  |   s   |
|   MILLISECOND OF MINUTE   |   ms  |   S   |
|   WEEK OF YEAR|   ww  |   w   |
|   MONTH   |   mm  |   MM  |
|   HALFDAY AM  |   am  |   aa  |
|   HALFDAY PM  |   pm  |   aa  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|   
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html  
|

Table of ansi pattern modifiers, which may be deleted from string
||  Pattern ||  Description ||
|   FM  |   fill mode (suppress padding blanks and zeroes)  |
|   FX  |   fixed format global option (see usage notes)|
|   TM  |   translation mode (print localized day and month names 
based on lc_messages) |
|   SP  |   spell mode (not yet implemented)|

  was:
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(string)", 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.
Table of joda and ansi patterns which may be replaced
||  Pattern name||  Ansi format ||  JodaTime format ||
|   FULL NAME OF DAY|   day |   |
|   DAY OF YEAR |   ddd |   D   |
|   DAY OF MONTH|   dd  |   d   |
|   DAY OF WEEK |   d   |   e   |
|   NAME OF MONTH   |   month   |   |
|   ABR NAME OF MONTH   |   mon |   MMM |
|   FULL ERA NAME   |   ee  |   G   |
|   NAME OF DAY |   dy  |   E   |
|   TIME ZONE   |   tz  |   TZ  |
|   HOUR 12 |   hh  |   h   |
|   HOUR 12 |   hh12|   h   |
|   HOUR 24 |   hh24|   H   |
|   MINUTE OF HOUR  |   mi  |   m   |
|   SECOND OF MINUTE|   ss  |   s   |
|   MILLISECOND OF MINUTE   |   ms  |   S   |
|   WEEK OF YEAR|   ww  |   w   |
|   MONTH   |   mm  |   MM  |
|   HALFDAY AM  |   am  |   aa  |
|   HALFDAY PM  |   pm  |   aa  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|   
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html  

[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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(string)", 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.
Table of joda and ansi patterns which may be replaced
||  Pattern name||  Ansi format ||  JodaTime format ||
|   FULL NAME OF DAY|   day |   |
|   DAY OF YEAR |   ddd |   D   |
|   DAY OF MONTH|   dd  |   d   |
|   DAY OF WEEK |   d   |   e   |
|   NAME OF MONTH   |   month   |   |
|   ABR NAME OF MONTH   |   mon |   MMM |
|   FULL ERA NAME   |   ee  |   G   |
|   NAME OF DAY |   dy  |   E   |
|   TIME ZONE   |   tz  |   TZ  |
|   HOUR 12 |   hh  |   h   |
|   HOUR 12 |   hh12|   h   |
|   HOUR 24 |   hh24|   H   |
|   MINUTE OF HOUR  |   mi  |   m   |
|   SECOND OF MINUTE|   ss  |   s   |
|   MILLISECOND OF MINUTE   |   ms  |   S   |
|   WEEK OF YEAR|   ww  |   w   |
|   MONTH   |   mm  |   MM  |
|   HALFDAY AM  |   am  |   aa  |
|   HALFDAY PM  |   pm  |   aa  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|   
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html  
|


  was:
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(string)", 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.
||  Pattern name||  Ansi format ||  JodaTime format ||
|   FULL NAME OF DAY|   day |   |
|   DAY OF YEAR |   ddd |   D   |
|   DAY OF MONTH|   dd  |   d   |
|   DAY OF WEEK |   d   |   e   |
|   NAME OF MONTH   |   month   |   |
|   ABR NAME OF MONTH   |   mon |   MMM |
|   FULL ERA NAME   |   ee  |   G   |
|   NAME OF DAY |   dy  |   E   |
|   TIME ZONE   |   tz  |   TZ  |
|   HOUR 12 |   hh  |   h   |
|   HOUR 12 |   hh12|   h   |
|   HOUR 24 |   hh24|   H   |
|   MINUTE OF HOUR  |   mi  |   m   |
|   SECOND OF MINUTE|   ss  |   s   |
|   MILLISECOND OF MINUTE   |   ms  |   S   |
|   WEEK OF YEAR|   ww  |   w   |
|   MONTH   |   mm  |   MM  |
|   HALFDAY AM  |   am  |   aa  |
|   HALFDAY PM  |   pm  |   aa  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|   
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html  
|



> 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
>
>
> The TO_DATE() is exposing the Joda string formatting conventions into the SQL 

[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Attachment: (was: 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
>
>
> 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(string)", 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.
> ||Pattern name||  Ansi format ||  JodaTime format ||
> | FULL NAME OF DAY|   day |   |
> | DAY OF YEAR |   ddd |   D   |
> | DAY OF MONTH|   dd  |   d   |
> | DAY OF WEEK |   d   |   e   |
> | NAME OF MONTH   |   month   |   |
> | ABR NAME OF MONTH   |   mon |   MMM |
> | FULL ERA NAME   |   ee  |   G   |
> | NAME OF DAY |   dy  |   E   |
> | TIME ZONE   |   tz  |   TZ  |
> | HOUR 12 |   hh  |   h   |
> | HOUR 12 |   hh12|   h   |
> | HOUR 24 |   hh24|   H   |
> | MINUTE OF HOUR  |   mi  |   m   |
> | SECOND OF MINUTE|   ss  |   s   |
> | MILLISECOND OF MINUTE   |   ms  |   S   |
> | WEEK OF YEAR|   ww  |   w   |
> | MONTH   |   mm  |   MM  |
> | HALFDAY AM  |   am  |   aa  |
> | HALFDAY PM  |   pm  |   aa  |
> | ref.|   
> https://www.postgresql.org/docs/8.2/static/functions-formatting.html| 
>   
> http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html
>   |



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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(string)", 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.
||  Pattern name||  Ansi format ||  JodaTime format ||
|   FULL NAME OF DAY|   day |   |
|   DAY OF YEAR |   ddd |   D   |
|   DAY OF MONTH|   dd  |   d   |
|   DAY OF WEEK |   d   |   e   |
|   NAME OF MONTH   |   month   |   |
|   ABR NAME OF MONTH   |   mon |   MMM |
|   FULL ERA NAME   |   ee  |   G   |
|   NAME OF DAY |   dy  |   E   |
|   TIME ZONE   |   tz  |   TZ  |
|   HOUR 12 |   hh  |   h   |
|   HOUR 12 |   hh12|   h   |
|   HOUR 24 |   hh24|   H   |
|   MINUTE OF HOUR  |   mi  |   m   |
|   SECOND OF MINUTE|   ss  |   s   |
|   MILLISECOND OF MINUTE   |   ms  |   S   |
|   WEEK OF YEAR|   ww  |   w   |
|   MONTH   |   mm  |   MM  |
|   HALFDAY AM  |   am  |   aa  |
|   HALFDAY PM  |   pm  |   aa  |
|   ref.|   
https://www.postgresql.org/docs/8.2/static/functions-formatting.html|   
http://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html  
|


  was:
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(string)", 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.


> 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(string)", 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.
> ||Pattern name||  Ansi format ||  JodaTime format ||
> | FULL NAME OF DAY|   day |   |
> | DAY OF YEAR |   ddd |   D   |
> | DAY OF MONTH|   dd  |   d   |
> | DAY OF WEEK |   d   |   e   |
> | NAME OF MONTH   |   month   |   |
> | ABR NAME OF MONTH   |   mon |   MMM |
> | FULL ERA NAME   |   ee  |   G   |
> | NAME OF DAY |   dy  |   E   |
> | TIME ZONE   |   tz  |   TZ  |
> | HOUR 12 |   hh  |   h   |
> | HOUR 12 |   hh12|  

[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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(string)", 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.

Pattern nameAnsi formatJodaTime formatFULL 
NAME OF DAYdayDAY OF YEARdddDDAY OF 
MONTHdddDAY OF 
WEEKdeNAME 
OF MONTHmonthABR NAME OF MONTHmonMMMFULL 
ERA NAMEeeGNAME OF DAYdyETIME 
ZONEtzTZHOUR 
12 hhhHOUR 
12 hh12hHOUR 
24hh24HMINUTE 
OF HOURmimSECOND 
OF MINUTEsssMILLISECOND OF MINUTEmsSWEEK 
OF YEARwwwMONTHmmMMHALFDAY AMamaaHALFDAY PMpmaaref.https://www.postgresql.org/docs/8.2/static/functions-formatting.htmlhttp://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html

  was:
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(string)", 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.



> 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(string)", 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.
>  class="Table1"> width="264"/> class="Table1_A1">Pattern name style="text-align:left;width:2.25in; " class="Table1_A1">Ansi 
> format class="Table1_A1">JodaTime format style="text-align:left;width:2.0625in; " class="Table1_A1">FULL 
> NAME OF DAY class="Table1_A1">day style="text-align:left;width:2.375in; " class="Table1_A1"> class="P3"> class="Table1_A1">DAY OF YEAR style="text-align:left;width:2.25in; " class="Table1_A1"> class="P3">ddd class="Table1_A1">D style="text-align:left;width:2.0625in; " class="Table1_A1">DAY 
> OF MONTH class="Table1_A1">dd style="text-align:left;width:2.375in; " class="Table1_A1"> class="P3">d class="Table1_A1">DAY OF WEEK style="text-align:left;width:2.25in; " class="Table1_A1"> class="P3">d class="Table1_A1">e style="text-align:left;width:2.0625in; " class="Table1_A1">NAME 
> OF MONTH class="Table1_A1">month style="text-align:left;width:2.375in; " class="Table1_A1"> class="P3"> class="Table1_A1">ABR NAME OF MONTH style="text-align:left;width:2.25in; " class="Table1_A1"> class="P3">mon class="Table1_A1">MMM style="text-align:left;width:2.0625in; " class="Table1_A1">FULL 
> ERA NAME class="Table1_A1">ee style="text-align:left;width:2.375in; " class="Table1_A1"> class="P3">G class="Table1_A1">NAME OF DAY style="text-align:left;width:2.25in; " class="Table1_A1"> class="P3">dy class="Table1_A1">E style="text-align:left;width:2.0625in; " class="Table1_A1">TIME 
> ZONE class="P3">tz class="Table1_A1">TZ style="text-align:left;width:2.0625in; " class="Table1_A1">HOUR 
> 12  class="P3">hh class="Table1_A1">h 

[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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(string)", 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.

  was:
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(string)", 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.

Pattern nameAnsi formatJodaTime formatFULL 
NAME OF DAYdayDAY OF YEARdddDDAY OF 
MONTHdddDAY OF 
WEEKdeNAME 
OF MONTHmonthABR NAME OF MONTHmonMMMFULL 
ERA NAMEeeGNAME OF DAYdyETIME 
ZONEtzTZHOUR 
12 hhhHOUR 
12 hh12hHOUR 
24hh24HMINUTE 
OF HOURmimSECOND 
OF MINUTEsssMILLISECOND OF MINUTEmsSWEEK 
OF YEARwwwMONTHmmMMHALFDAY AMamaaHALFDAY PMpmaaref.https://www.postgresql.org/docs/8.2/static/functions-formatting.htmlhttp://www.joda.org/joda-time/apidocs/org/joda/time/format/DateTimeFormat.html


> 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(string)", 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)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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(string)", 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.


  was:
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.



> 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(string)", 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)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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.


  was:
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.


> 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)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-31 Thread Serge Harnyk (JIRA)

 [ 
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)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-30 Thread Serge Harnyk (JIRA)

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

Serge Harnyk updated DRILL-4864:

Description: 
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.

> 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
>
>
> 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)


[jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions

2016-08-30 Thread Arina Ielchiieva (JIRA)

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

Arina Ielchiieva updated DRILL-4864:

Description: 
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.

  was:
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.


> 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
>
>
> 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)