Thank you Brian, Andrew for your response.
Do you see any alternatives currently in Beam SQL that could be used to achieve 
this ?
From: Andrew Pilloud <apill...@google.com>
Sent: Wednesday, May 5, 2021 10:39 PM
To: Brian Hulette <bhule...@google.com>
Cc: user <user@beam.apache.org>
Subject: Re: Query regarding support for ROLLUP

I can confirm we don't have anything in Beam to support ROLLUP, it is silently 
dropped. I opened https://issues.apache.org/jira/browse/BEAM-12288, support 
needs to be implemented in 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamAggregationRel.java
  For now I'll remove it from our docs and update the planner to reject the 
query (https://issues.apache.org/jira/browse/BEAM-12289).

On Wed, May 5, 2021 at 8:16 AM Brian Hulette 
<bhule...@google.com<mailto:bhule...@google.com>> wrote:
+Andrew Pilloud<mailto:apill...@google.com> do you know if this is a bug?

On Tue, May 4, 2021 at 7:38 AM D, Anup (Nokia - IN/Bangalore) 
<anu...@nokia.com<mailto:anu...@nokia.com>> wrote:
Hi All,

I was trying to use “GROUP BY WITH ROLLUP” (2.29.0 version) which I saw here - 
https://beam.apache.org/documentation/dsls/sql/calcite/query-syntax/#<https://beam.apache.org/documentation/dsls/sql/calcite/query-syntax/>

"select warehouse, SUM(quantity) as quantity from PCOLLECTION group by 
ROLLUP(warehouse)"));

Warehouse | quantity
-----------------------------
Melbourne |  100
New York    |  200
New York    | 200

Output below seems to ignore ROLLUP.

Warehouse | quantity
-------------------------------
Melbourne | 100
New York    | 400

Warehouse_Total | 500 => not generated

Could you please confirm if this is supported or I am missing something.
I tried to search JIRA/documentation to get some pointers but could not find.

Thanks
Anup

Reply via email to