drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khurram Faraaz (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-3728) millisecond portion of time value missing from query results
Date Thu, 08 Oct 2015 17:55:26 GMT

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

Khurram Faraaz updated DRILL-3728:
----------------------------------
    Fix Version/s:     (was: Future)
                   1.3.0

> millisecond portion of time value missing from query results
> ------------------------------------------------------------
>
>                 Key: DRILL-3728
>                 URL: https://issues.apache.org/jira/browse/DRILL-3728
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>    Affects Versions: 1.2.0
>            Reporter: Khurram Faraaz
>             Fix For: 1.3.0
>
>
> Some rows in the results below are missing the millisecond portion of the time value.
> {code}
> 0: jdbc:drill:schema=dfs.tmp> SELECT cast(col5 as time) FROM FEWRWSPQQ_101;
> +---------------+
> |    EXPR$0     |
> +---------------+
> | 00:28:02.338  |
> | 00:28:02.228  |
> | 00:28:02.616  |
> | 00:28:02.404  |
> | 00:28:02.309  |
> | 00:28:02.638  |
> | 00:28:02.748  |
> | 00:28:02.321  |
> | 00:28:02      |
> | 00:28:02      |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.118  |
> | 00:28:02.218  |
> | 00:28:02.418  |
> | 00:28:02.318  |
> | 20:28:02.318  |
> +---------------+
> 22 rows selected (0.491 seconds)
> {code}
> Column of type timestamp from which I try to extract the time portion in above query.
> {code}
> 0: jdbc:drill:schema=dfs.tmp> SELECT col5 FROM FEWRWSPQQ_101;
> +--------------------------+
> |           col5           |
> +--------------------------+
> | 2014-03-02 00:28:02.338  |
> | 2014-01-02 00:28:02.228  |
> | 2014-09-02 00:28:02.616  |
> | 2015-02-02 00:28:02.404  |
> | 2014-07-02 00:28:02.309  |
> | 1985-04-02 00:28:02.638  |
> | 2006-05-02 00:28:02.748  |
> | 2005-06-02 00:28:02.321  |
> | 1950-08-02 00:28:02.111  |
> | 1947-07-02 00:28:02.418  |
> | 1973-06-02 00:28:02.418  |
> | 1992-06-02 00:28:02.418  |
> | 1994-06-02 00:28:02.418  |
> | 2000-06-02 00:28:02.418  |
> | 2002-06-02 00:28:02.418  |
> | 2003-06-02 00:28:02.418  |
> | 2004-06-02 00:28:02.418  |
> | 2010-06-02 00:28:02.118  |
> | 2011-06-02 00:28:02.218  |
> | 2012-06-02 00:28:02.418  |
> | 2013-06-02 00:28:02.318  |
> | 2015-08-02 20:28:02.318  |
> +--------------------------+
> 22 rows selected (0.285 seconds)
> {code}
> When we cast the extracted time portion to varchar type, the millisecond portion is not
missing from the rows that it was missing in the first query above.
> {code}
> 0: jdbc:drill:schema=dfs.tmp> SELECT cast(cast(col5 as time) as varchar(12)) FROM
FEWRWSPQQ_101;
> +---------------+
> |    EXPR$0     |
> +---------------+
> | 00:28:02.338  |
> | 00:28:02.228  |
> | 00:28:02.616  |
> | 00:28:02.404  |
> | 00:28:02.309  |
> | 00:28:02.638  |
> | 00:28:02.748  |
> | 00:28:02.321  |
> | 00:28:02.111  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.418  |
> | 00:28:02.118  |
> | 00:28:02.218  |
> | 00:28:02.418  |
> | 00:28:02.318  |
> | 20:28:02.318  |
> +---------------+
> 22 rows selected (0.285 seconds)
> {code}



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

Mime
View raw message