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

Parsing Error in GROUPING SETS

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      None

      Description

      The following query:

      SELECT tab1.a,
             tab1.b,
             SUM(tab1.c)
      FROM tab1
      GROUP BY tab1.a,
               tab1.b
      GROUPING SETS ((tab1.a, tab1.b))
      

      results in the following error:

      ParseException line 7:22 missing ) at ',' near '<EOF>'
      line 7:31 extraneous input ')' expecting EOF near '<EOF>'
      

      Changing the query to:

      SELECT tab1.a,
             tab1.b,
             SUM(tab1.c)
      FROM tab1
      GROUP BY tab1.a,
               tab1.b
      GROUPING SETS ((a, tab1.b))
      

      makes it work.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pxiong Pengcheng Xiong
                Reporter:
                ragarwal Rohit Agarwal
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: