You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chun Chang (JIRA)" <ji...@apache.org> on 2015/04/25 01:03:39 UTC

[jira] [Closed] (DRILL-2389) The hour number extracted from current_timestamp is wrong

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

Chun Chang closed DRILL-2389.
-----------------------------
    Assignee: Chun Chang  (was: Mehant Baid)

This is covered in the Functional/Passing/datetime. It is broken up into several test cases.

{code}
0: jdbc:drill:schema=dfs.drillTestDirAdvanced> select current_timestamp, extract(year from current_timestamp) yr, extract(month from current_timestamp) m, extract(day from current_timestamp) d, extract(hour from current_timestamp) h, extract(minute from current_timestamp) minu, extract(second from current_timestamp) s from sys.drillbits limit 1;
+-------------------+------------+------------+------------+------------+------------+------------+
| current_timestamp |     yr     |     m      |     d      |     h      |    minu    |     s      |
+-------------------+------------+------------+------------+------------+------------+------------+
| 2015-04-24 15:55:20.022 | 2015       | 4          | 24         | 15         | 55         | 20.022     |
+-------------------+------------+------------+------------+------------+------------+------------+
{code}

> The hour number extracted from current_timestamp is wrong
> ---------------------------------------------------------
>
>                 Key: DRILL-2389
>                 URL: https://issues.apache.org/jira/browse/DRILL-2389
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>    Affects Versions: 0.8.0
>            Reporter: Chun Chang
>            Assignee: Chun Chang
>            Priority: Critical
>             Fix For: 0.9.0
>
>         Attachments: DRILL-2389.patch
>
>
> #Wed Mar 04 01:23:42 EST 2015
> git.commit.id.abbrev=71b6bfe
> Note, the hour number extracted from current_timestamp is changed from 15 to 23.
> {code}
> 0: jdbc:drill:schema=dfs.drillTestDirComplexJ> select current_timestamp, extract(year from current_timestamp) yr, extract(month from current_timestamp) m, extract(day from current_timestamp) d, extract(hour from current_timestamp) h, extract(minute from current_timestamp) minu, extract(second from current_timestamp) s from sys.drillbits;
> +-------------------+------------+------------+------------+------------+------------+------------+
> | current_timestamp |     yr     |     m      |     d      |     h      |    minu    |     s      |
> +-------------------+------------+------------+------------+------------+------------+------------+
> | 2015-03-04 15:48:27.334 | 2015       | 3          | 4          | 23         | 48         | 27.334     |
> | 2015-03-04 15:48:27.334 | 2015       | 3          | 4          | 23         | 48         | 27.334     |
> | 2015-03-04 15:48:27.334 | 2015       | 3          | 4          | 23         | 48         | 27.334     |
> | 2015-03-04 15:48:27.334 | 2015       | 3          | 4          | 23         | 48         | 27.334     |
> +-------------------+------------+------------+------------+------------+------------+------------+
> 4 rows selected (0.07 seconds)
> {code}



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