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

dynamic partition with null key from union select will fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.14.0
    • 1.2.1
    • Tez
    • None
    • hive 0.14
      hadoop 2.6.0
      tez 0.6.1

    Description

      Using union with dynamic partition insert will fail if there is a null partition name.

      hive> select * from testDynamicTezPartitionWithUnionSource;
      OK
      jay 18 20150101 NULL NULL
      jack 20 20150101 NULL NULL
      linda 25 20150102 BJ NULL
      nancy 33 20150103 BJ NC

      hive> set hive.execution.engine=tez;
      hive> set hive.exec.dynamic.partition=true;
      hive> insert into table testDynamicTezPartitionWithUnion partition(birthday=20150101, city, school) select name, age, city, school from testDynamicTezPartitionWithUnionSource where name="jay" union all select name, age, city, school from testDynamicTezPartitionWithUnionSource where name="jack";
      ...
      Loading data to table test.testdynamictezpartitionwithunion partition (birthday=20150101, city=null, school=null)
      Failed with exception MetaException(message:Invalid partition key & values; keys [birthday, city, school, ], values [20150101, NULL, ])
      FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask

      When change engine to mr, every thing just works fine.

      Attachments

        Activity

          People

            Unassigned Unassigned
            busyjay Jay Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: