Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-20792

Inserting timestamp with zones truncates the data

    XMLWordPrintableJSON

Details

    Description

      For example with the table:

      CREATE TABLE myTable
      (
      a TIMESTAMP
      )
      STORED AS ORC
      tblproperties("transactional"="true");
      

      The following inserts store the wrong data:

      INSERT INTO myTable VALUES("2018-10-19 10:35:00 UTC"); -> 2018-10-19 00:00:00.0
      INSERT INTO myTable VALUES("2018-10-19 10:35:00 ZZZ"); -> 2018-10-19 00:00:00.0
      

      The second one should fail since ZZZ is not a time zone.
      Similarly if the column is of type DATE,

      INSERT INTO myTableDate VALUES("2018-10-19 AAAA"); -> 2018-10-19
      

      Attachments

        1. HIVE-20792.1.patch
          7 kB
          Jaume M
        2. HIVE-20792.2.patch
          7 kB
          Jaume M
        3. HIVE-20792.3.patch
          7 kB
          Jaume M

        Activity

          People

            jmarhuen Jaume M
            jmarhuen Jaume M
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: