You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/04/04 02:37:25 UTC

[GitHub] [flink] KurtYoung commented on a change in pull request #8110: [FLINK-12098] [table-planner-blink] Add support for generating optimized logical plan for simple group aggregate on stream

KurtYoung commented on a change in pull request #8110: [FLINK-12098] [table-planner-blink] Add support for generating optimized logical plan for simple group aggregate on stream
URL: https://github.com/apache/flink/pull/8110#discussion_r271998426
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/util/AggregateUtil.scala
 ##########
 @@ -495,4 +497,65 @@ object AggregateUtil extends Enumeration {
     }
     (aggBufferNames ++ distinctBufferNames).toArray
   }
+
+  /**
+    * Optimize max or min with retraction agg. MaxWithRetract can be optimized to Max if input is
+    * update increasing.
+    */
+  def getNeedRetractions(
+      groupSize: Int,
+      needRetraction: Boolean,
+      aggs: Seq[AggregateCall]): Array[Boolean] = {
+
+    val needRetractionArray = Array.fill(aggs.size)(needRetraction)
+    // TODO supports RelModifiedMonotonicity
+
+    needRetractionArray
+  }
+
+  /**
+    * Derives output row type from local aggregate
+    */
+  def inferLocalAggRowType(
+      aggInfoList: AggregateInfoList,
+      inputRowType: RelDataType,
+      groupSet: Array[Int],
+      typeFactory: FlinkTypeFactory): RelDataType = {
+
 
 Review comment:
   delete blank line
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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