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

GROUPING__ID failed to be recognized in multiple insert

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1
    • 2.0.0
    • Parser
    • None
    • apache hive 1.2.1
      apache hadoop 2.6.2

    Description

      When using multiple insert with multiple group by, grouping__id will failed to be parse.

      hive> create temporary table testtable3 (id string, name string);
      OK
      Time taken: 1.019 seconds
      hive> create temporary table testtable2 (id string, name string);
      OK
      Time taken: 0.069 seconds
      hive> create temporary table testtable1 (id string, name string);
      OK
      Time taken: 0.066 seconds
      hive> insert into table testtable1 values ("id", "2333");
      ...
      OK
      Time taken: 32.515 seconds
      hive> from testtable1
      > insert into table testtable2 select
      > id, GROUPING__ID
      > group by id, name with cube;
      ...
      OK
      Time taken: 42.032 seconds
      hive> from testtable1
      > insert into table testtable2 select
      > id, GROUPING__ID
      > group by id, name with cube
      > insert into table testtable3 select
      > id, name
      > group by id, name grouping sets ((id), (id, name));
      FAILED: SemanticException [Error 10025]: Line 3:8 Expression not in GROUP BY key 'GROUPING__ID'

      Attachments

        1. HIVE-12744.01.patch
          11 kB
          Pengcheng Xiong

        Activity

          People

            pxiong Pengcheng Xiong
            busyjay Jay Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: