[
https://issues.apache.org/jira/browse/BEAM-12647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17385811#comment-17385811
]
Kyle Weaver commented on BEAM-12647:
------------------------------------
Right, the downside is that there will be two paths to maintain. We would have
to branch here to not use ByFields or CombineFieldsByFields:
https://github.com/apache/beam/blob/63257ed701c5287b605aafbd10f431e3e0019cc1/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamAggregationRel.java#L249-L285
We will have to make sure all cases are tested and working. This includes
multiple aggregations (e.g. SELECT COUNT(x), SUM(y), AVG(z), ...) both with and
without a GROUP BY clause. (I think windowing should be orthogonal, but we
should keep that in mind as well.) Existing test exercising multiple
aggregations with GROUP BY:
[https://github.com/apache/beam/blob/b8e390aeb83a6bb05a54bbb16bfb239d0fbd9e10/sdks/java/extensions/sql/src/test/java/org/apache/beam/sdk/extensions/sql/BeamSqlDslAggregationTest.java#L174-L189]
[~benglez] I'm assigning this to you, but let us know if you have any questions
or concerns.
> Aggregations on empty pcoll don't return a value.
> -------------------------------------------------
>
> Key: BEAM-12647
> URL: https://issues.apache.org/jira/browse/BEAM-12647
> Project: Beam
> Issue Type: Bug
> Components: dsl-sql, dsl-sql-zetasql
> Reporter: Kyle Weaver
> Priority: P3
>
> {{For example, "SELECT COUNT(\*) FROM table_empty" should return 0, but
> instead it returns no value.}}
> cc [~benglez] [~apilloud]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)