You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/02/02 19:22:39 UTC

[jira] [Resolved] (CALCITE-1072) CSV adapter incorrectly parses TIMESTAMP values after noon

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

Julian Hyde resolved CALCITE-1072.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.7.0

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/7b944ade.

Thanks for the well-researched bug report, [~ChrisAlbright]; it made it very easy to fix!

> CSV adapter incorrectly parses TIMESTAMP values after noon
> ----------------------------------------------------------
>
>                 Key: CALCITE-1072
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1072
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Chris Albright
>            Assignee: Julian Hyde
>             Fix For: 1.7.0
>
>
> When querying timestamp data using the CSV adapter, the time is always in A.M.
> for example this input file: EXAMPLE_DATA.csv
> ID:long,START:timestamp,END:timestamp
> 1,"2015-12-31 07:15:56","2015-12-31 13:31:21"
> yields this output in sqlline:
> select * from example_data;
> | ID | START | END |
> | 1  | 2015-12-31 07:15:56 | 2015-12-31 01:31:21 |
> The bug appears to be in org.apache.calcite.adapter.csv.CsvEnumerator on lines 59 and 60. The parse formats use 'hh' instead of 'HH' for the hour part.



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