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

CSV adapter incorrectly parses TIMESTAMP values after noon

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: