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

Null pointer exception for update query on a partitioned acid table

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 3.1.1
    • None
    • Transactions
    • None

    Description

      In case of an acid table, the final paths (array) of the filesink operator is populated by using bucket id as the index. This causes the final paths to have null entries when we don't write to some of the buckets. Thus, finally while committing the paths in closeOp this results in an NPE.

      Observed for the following query:

      CREATE TABLE if not exists test_bckt_part(a int) partitioned by (b int)
      stored as orc;
      CREATE TABLE test_src_delete (a int, b int) CLUSTERED BY (b) into 5 BUCKETS;
      INSERT INTO TABLE test_src_delete values (1,2),(3,4),(5,2),(7,8),(9,10),(11,2),(34,53),(95,23),(1,2),(3,4),(5,2),(7,8),(9,10),(11,2),(34,53),(95,23);
      set tez.grouping.split-count=5;
      INSERT OVERWRITE TABLE test_bckt_part SELECT * FROM test_src_delete;
      Alter table test_bckt_part SET TBLPROPERTIES ('transactional'='true');
      update test_bckt_part set a=99 where b=23;
      

        

      Attachments

        1. HIVE-22067.patch
          0.9 kB
          Aditya Shah
        2. HIVE-22067.1.patch
          0.9 kB
          Aditya Shah

        Activity

          People

            aditya-shah Aditya Shah
            aditya-shah Aditya Shah
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: