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

Insert wrong dates to Hive tables

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.1, 3.1.0
    • Fix Version/s: 3.0.1, 3.1.0
    • Component/s: SQL
    • Labels:
      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

            • Assignee:
              maxgekk Max Gekk
              Reporter:
              maxgekk Max Gekk
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: