title: Syntax of using case in grouping sets
body: <p>The Hive query snippet in question is as below:</p>
  
  <pre><code>group by
    case
      when inte.subId is not null then 'int'
      else 'ext'
    end,
    taskType,
    result
  grouping sets(
    (
      case
        when inte.subId is not null then 'int'
        else 'ext'
      end,  -- line 36
      taskType,
      result
    ),  -- line 39
    (
      taskType,
      result
    )
  )
  </code></pre>
  
  <p>The log suggests some syntax error at line 36 and 39:</p>
  
  <pre><code>FAILED: ParseException line 36:7 missing ) at ',' near ')'
  line 39:3 missing EOF at ',' near ')'
  </code></pre>
  
  <p>Any idea?
  If you need more info from me, feel free to comment.</p>