Hi,
Does Impala support grouping sets?
If so,I can use sql1 instead of sql2 to avoid extra scan operation
Or does impala support some operation like it?

sql1:
SELECT A,
       B,
       C,
       count(1)
FROM tableName
GROUP BY A,
         B,
         C
grouping sets
(

   (A,B),
   (B,C)

)


sql2:
SELECT A,
       B,
       NULL,
       count(1)
FROM tableName
GROUP BY A,
         B
UNION ALL
SELECT NULL,
       B,
       C,
       count(1)
FROM tableName
GROUP BY B,
         C





Best regards<http://mail.163.com/dashi/dlpro.html?from=mail66>,
Xiaojian

Reply via email to