[ https://issues.apache.org/jira/browse/FLINK-5315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16559889#comment-16559889 ]
Rong Rong commented on FLINK-5315: ---------------------------------- Yes [~hequn8128]. Currently I am transferring the distinct modifier for the parameters towards the aggregate function. However, I think {{a.count.distinct}} is confusing, since {{a.count}} returns a valid expression, and {{<expr>.distinct}} is as well a valid expression, but chaining 2 aggregates together is not a valid expression though. So it is not immediately clear to end users what this means. But the point seems to be interesting when considering multiple parameters like [~fhueske] mentioned: {{multiParamAgg('a.distinct, 'b.distinct)}} seems to duplicate the unnecessary {{distinct}} twice which can be a burden to user to specify multiple times. So on the UDAGG side, I think the proposal to use `udagg.distinct('a, 'b)` seems to be a good idea. Thoughts? > Support distinct aggregations in table api > ------------------------------------------ > > Key: FLINK-5315 > URL: https://issues.apache.org/jira/browse/FLINK-5315 > Project: Flink > Issue Type: Sub-task > Components: Table API & SQL > Reporter: Kurt Young > Assignee: Rong Rong > Priority: Major > > Such as > {code} > t.select("count(distinct a), sum(b)") > {code} > or > {code} > t.select('a.count.distinct), 'b.sum) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)