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

CSV adapter incorrectly parses TIMESTAMP values after noon

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment