drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Hsuan-Yi Chu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-3971) to_date(timestamp) is supported
Date Fri, 23 Oct 2015 18:12:28 GMT

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

Sean Hsuan-Yi Chu updated DRILL-3971:
-------------------------------------
    Description: 
Do a search for "to_date" in this link:
https://drill.apache.org/docs/data-type-conversion/

We would find that it says these two are supported:
1. expression is a character string enclosed... (rest is omitted)
2. 'format' is a format specifier enclosed... (rest is omitted)

Due to DRILL-3769, let's add one more supported case: expression can be timp_stamp type. 

A example would be:
{code}
0: jdbc:drill:zk=local> select to_date(to_timestamp(1000000000)) from (VALUES(1));
+-------------+
|   EXPR$0    |
+-------------+
| 2001-09-09  |
+-------------+
{code}
Note that to_timestamp(1000000000) would generate a timestamp with value 2001-09-08 18:46:40.0
(on MAC, which can be different on Linux )

  was:
Do a search for "to_date" in this link:
https://drill.apache.org/docs/data-type-conversion/

We would find that it says these two are supported:
1. expression is a character string enclosed... (rest is omitted)
2. 'format' is a format specifier enclosed... (rest is omitted)

Due to DRILL-3769, let's add one more supported case: expression can be timp_stamp type. 

A example would be:
{code }
0: jdbc:drill:zk=local> select to_date(to_timestamp(1000000000)) from (VALUES(1));
+-------------+
|   EXPR$0    |
+-------------+
| 2001-09-09  |
+-------------+
{code }
Note that to_timestamp(1000000000) would generate a timestamp with value 2001-09-08 18:46:40.0
(on MAC, which can be different on Linux )


> to_date(timestamp) is supported 
> --------------------------------
>
>                 Key: DRILL-3971
>                 URL: https://issues.apache.org/jira/browse/DRILL-3971
>             Project: Apache Drill
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Kristine Hahn
>
> Do a search for "to_date" in this link:
> https://drill.apache.org/docs/data-type-conversion/
> We would find that it says these two are supported:
> 1. expression is a character string enclosed... (rest is omitted)
> 2. 'format' is a format specifier enclosed... (rest is omitted)
> Due to DRILL-3769, let's add one more supported case: expression can be timp_stamp type.

> A example would be:
> {code}
> 0: jdbc:drill:zk=local> select to_date(to_timestamp(1000000000)) from (VALUES(1));
> +-------------+
> |   EXPR$0    |
> +-------------+
> | 2001-09-09  |
> +-------------+
> {code}
> Note that to_timestamp(1000000000) would generate a timestamp with value 2001-09-08 18:46:40.0
(on MAC, which can be different on Linux )



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

Mime
View raw message