[ https://issues.apache.org/jira/browse/FLINK-5315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16569082#comment-16569082 ]
Hequn Cheng commented on FLINK-5315: ------------------------------------ Hi [~walterddr], good thinking. I agree that sql is more perfect. However, I don't think we need another change. I still think these are two kinds of distinct. One is distinct of agg, the other is distinct of table. For distinct of agg, we can treat the distinct word as a modifier. It is important to make distinct directly stick with the agg, so that it is consistent when we write {{'a.agg.distinct}} and {{agg.distinct('a)}}. For distinct of table, the distinct is an operator. We don't have to stick the distinct operator with the select operator. The distinct even has nothing to do with the select. > 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 > > Support distinct aggregations in Table API in the following format: > For Expressions: > {code:scala} > 'a.count.distinct // Expressions distinct modifier > {code} > For User-defined Function: > {code:scala} > singleArgUdaggFunc.distinct('a) // FunctionCall distinct modifier > multiArgUdaggFunc.distinct('a, 'b) // FunctionCall distinct modifier > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)