hequn8128 commented on a change in pull request #6521: [FLINK-5315][table] 
Adding support for distinct operation for table API on DataStream
URL: https://github.com/apache/flink/pull/6521#discussion_r214681480
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala
 ##########
 @@ -214,10 +214,25 @@ trait ImplicitExpressionOperations {
   def varSamp = VarSamp(expr)
 
   /**
-    *  Returns multiset aggregate of a given expression.
+    * Returns multiset aggregate of a given expression.
     */
   def collect = Collect(expr)
 
+  /**
+    * Returns a distinct field reference to a given expression
+    */
+  def distinct: Expression = {
 
 Review comment:
   Hi @walterddr , I guess what fabian means is putting this function into 
`org.apache.flink.table.expressions.Aggregation`, so that `distinct` can only 
be called by an aggregate. In this way, we can even remove the test cases such 
as `testDistinctOnNonAggregateExpression` since compile error will be thrown 
directly by the IDE. What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to