No, Impala does not support grouping sets. There is work ongoing to allow for multiple groupings in a single query (see https://issues.apache.org/jira/browse/IMPALA-110), which will eventually be used to implement grouping sets, but there is no timeline on when that work will be done.
We of course always welcome contributions if there's any part of this work that you'd like to take on. On Tue, May 29, 2018 at 8:00 PM 陈 小健 <[email protected]> wrote: > 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 > >
