Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2513

JsonWriter writes a timestamp values for 'time' datatype

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 0.9.0
    • Storage - JSON
    • None

    Description

      git.commit.id.abbrev=9c9ee8c

      Query :

      create table temp_fromcsv as select cast(columns[3] as time) time_col from dfs.`cross-sources`.`fewtypes.tbl`;
      

      The newly create json file has the below values

      select * from dfs.`cross-sources`.`temp_fromcsv`;
      +------------+
      |  time_col  |
      +------------+
      | 1970-01-01T00:00:00.000Z |
      | 1970-01-01T01:00:00.000Z |
      | 1970-01-01T02:03:00.000Z |
      | 1970-01-01T11:59:00.000Z |
      | 1970-01-01T12:00:00.000Z |
      | 1970-01-01T12:01:00.000Z |
      | 1970-01-01T23:59:00.000Z |
      | 1970-01-01T23:59:59.990Z |
      | 1970-01-01T15:36:39.000Z |
      | 1970-01-01T15:36:39.000Z |
      | 1970-01-01T00:01:00.000Z |
      | 1970-01-01T02:33:00.000Z |
      | 1970-01-01T23:59:00.000Z |
      | 1970-01-01T12:03:00.000Z |
      | 1970-01-01T12:31:00.000Z |
      | 1970-01-01T19:59:00.000Z |
      | 1970-01-01T11:59:59.990Z |
      | 1970-01-01T15:37:39.000Z |
      | 1970-01-01T15:36:39.000Z |
      | 1970-01-01T11:59:59.990Z |
      | 1970-01-01T15:37:39.000Z |
      

      This issue does not happen with ParquetWriter
      I attached the data file used.

      Attachments

        1. fewtypes.tbl
          2 kB
          Rahul Kumar Challapalli

        Issue Links

          Activity

            People

              jnadeau Jacques Nadeau
              rkins Rahul Kumar Challapalli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: