Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-32594

Insert wrong dates to Hive tables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.1, 3.1.0
    • 3.0.1, 3.1.0
    • SQL
    • None

    Description

      Run spark-sql -S:

      spark-sql> CREATE TABLE table1 (d date);
      20/08/11 23:17:20 WARN HiveMetaStore: Location: file:/Users/maximgekk/proj/insert-date-into-hive-table/spark-warehouse/table1 specified for non-external table:table1
      spark-sql> INSERT INTO table1 VALUES (date '2020-08-11');
      spark-sql> SELECT * FROM table1;
      1970-01-01
      

      The expected result of the last statement is 2020-08-11 but got 1970-01-01.

      Attachments

        Activity

          People

            maxgekk Max Gekk
            maxgekk Max Gekk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: