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

Allow standard compliant syntax for insert on partitioned tables

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1.0
    • SQL

    Description

      Following works:

      
      create table t1 (a int, b int, c int);
      
      create table t2 (a int, b int, c int) partitioned by (d int);
      
      insert into t1 values (1,2,3);
      
      insert into t1 (c, b, a) values (1,2,3);
      
      insert into t1 (a,b) values (1,2);
      
      

      For partitioned tables it should work similarly but doesn't.  All of following fails:

      
      insert into t2 values (1,2,3,4);
      
      insert into t2 (a, b, c, d) values (1,2,3,4);
      
      insert into t2 (c,d) values (1,2);
      
      insert into t2 (a,b) values (1,2);
      
      

      All of above should work. Also note following works:

      
      insert into t2 partition(d)  values (1,2,3,4);
      
      insert into t2 partition(d=4)  values (1,2,3);
      
      

       

      Attachments

        1. HIVE-18792.1.patch
          4 kB
          Vineet Garg
        2. HIVE-18792.2.patch
          17 kB
          Vineet Garg
        3. HIVE-18792.3.patch
          17 kB
          Vineet Garg

        Activity

          People

            vgarg Vineet Garg
            ashutoshc Ashutosh Chauhan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: