Github user wuchong commented on a diff in the pull request:
https://github.com/apache/flink/pull/3266#discussion_r99998638
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/DataSetSessionWindowAggregatePreProcessor.scala
---
@@ -19,30 +19,36 @@ package org.apache.flink.table.runtime.aggregate
import java.lang.Iterable
-import org.apache.flink.api.common.functions.RichGroupCombineFunction
+import org.apache.flink.api.common.functions.{AbstractRichFunction,
GroupCombineFunction,
+MapPartitionFunction}
import org.apache.flink.api.common.typeinfo.TypeInformation
import org.apache.flink.api.java.typeutils.ResultTypeQueryable
import org.apache.flink.types.Row
import org.apache.flink.configuration.Configuration
import org.apache.flink.util.{Collector, Preconditions}
/**
- * This wraps the aggregate logic inside of
- * [[org.apache.flink.api.java.operators.GroupCombineOperator]].
+ * It wraps the aggregate logic inside of
+ * [[org.apache.flink.api.java.operators.GroupCombineOperator]] and
+ * [[org.apache.flink.api.java.operators.MapPartitionOperator]] It is
used for
+ * Sessiontime-window on batch.
*
* @param aggregates The aggregate functions.
* @param groupingKeys The indexes of the grouping fields.
* @param intermediateRowArity The intermediate row field count.
* @param gap Session time window gap.
* @param intermediateRowType Intermediate row data type.
*/
-class DataSetSessionWindowAggregateCombineGroupFunction(
+class DataSetSessionWindowAggregatePreProcessor(
aggregates: Array[Aggregate[_ <: Any]],
groupingKeys: Array[Int],
intermediateRowArity: Int,
gap: Long,
@transient intermediateRowType: TypeInformation[Row])
- extends RichGroupCombineFunction[Row,Row] with ResultTypeQueryable[Row] {
+ extends AbstractRichFunction
+ with MapPartitionFunction[Row,Row]
--- End diff --
I would like to indent `with` and `extends` on the same indent.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---