sunjincheng121 commented on a change in pull request #9322: 
[FLINK-13471][table] Add FlatAggregate support to stream Table API(blink 
planner)
URL: https://github.com/apache/flink/pull/9322#discussion_r310175706
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/nodes/physical/stream/StreamExecGroupTableAggregate.scala
 ##########
 @@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.flink.table.planner.plan.nodes.physical.stream
+
+import java.util
+
+import org.apache.flink.api.dag.Transformation
+import org.apache.flink.streaming.api.operators.KeyedProcessOperator
+import org.apache.flink.streaming.api.transformations.OneInputTransformation
+import org.apache.flink.table.dataformat.BaseRow
+import org.apache.flink.table.planner.calcite.FlinkTypeFactory
+import org.apache.flink.table.planner.codegen.agg.AggsHandlerCodeGenerator
+import org.apache.flink.table.planner.codegen.CodeGeneratorContext
+import org.apache.flink.table.planner.delegation.StreamPlanner
+import org.apache.flink.table.planner.plan.metadata.FlinkRelMetadataQuery
+import org.apache.flink.table.planner.plan.nodes.exec.{ExecNode, 
StreamExecNode}
+import 
org.apache.flink.table.planner.plan.rules.physical.stream.StreamExecRetractionRules
+import org.apache.flink.table.planner.plan.utils.{AggregateInfoList, 
AggregateUtil, KeySelectorUtil, RelExplainUtil}
+import 
org.apache.flink.table.runtime.types.LogicalTypeDataTypeConverter.fromDataTypeToLogicalType
+import org.apache.flink.table.runtime.typeutils.BaseRowTypeInfo
+import org.apache.calcite.plan.{RelOptCluster, RelTraitSet}
+import org.apache.calcite.rel.`type`.RelDataType
+import org.apache.calcite.rel.core.AggregateCall
+import org.apache.calcite.rel.{RelNode, RelWriter, SingleRel}
+import org.apache.flink.table.runtime.operators.aggregate.GroupTableAggFunction
+
+import scala.collection.JavaConversions._
+
+/**
+  * Stream physical RelNode for unbounded group table aggregate.
+  */
+class StreamExecGroupTableAggregate(
 
 Review comment:
   I have also thinking about the reuse problem. The biggest obstacle for reuse 
these two classes is `StreamExecGroupAggregate` extends
     `StreamExecGroupAggregateBase` now. The `StreamExecGroupAggregateBase` has 
the same semantic with `Aggregate`. For StreamExecGroupTableAggregate,
     it is a `TableAggregate`. As `Aggregate` and `TableAggregate` contains 
different semantics, StreamExecGroupTableAggregate could not extends 
`StreamExecGroupAggregateBase` or other base class which extends 
`StreamExecGroupAggregateBase`.
   
   How over, we can also use some interface or Util class to reuse the two 
classes, but from my point of view, the benefit is small, not only because the 
class contains code less than 200 lines, but also because add interface or Util 
here seems making code more complicated.
   
   What do you think?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to