Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1072

CSV adapter incorrectly parses TIMESTAMP values after noon

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            ChrisAlbright Chris Albright
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: