flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] walterddr commented on a change in pull request #6521: [FLINK-5315][table] Adding support for distinct operation for table API on DataStream
Date Fri, 10 Aug 2018 16:22:42 GMT
walterddr 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_r209313630
 
 

 ##########
 File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/AggregateFunction.scala
 ##########
 @@ -136,4 +136,11 @@ abstract class AggregateFunction[T, ACC] extends UserDefinedFunction
{
     *         accumulator type should be automatically inferred.
     */
   def getAccumulatorType: TypeInformation[ACC] = null
+
+  private[flink] var isDistinctAgg: Boolean = false
+
+  private[flink] def distinct: AggregateFunction[T, ACC] = {
 
 Review comment:
   This is not going to work as it modifies an underlying field of this particular AggregateFunction
object. 
   For example: 
   ```
   table.select(udagg.distinct('a), udagg('a))
   ```
   will return the same result in both column because distinct modifier has been added to
this particular `udagg` element. This is a blunder on my end and I should fixed this before
further reviews can be conducted. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message