flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] twalthr commented on a change in pull request #7177: [FLINK-7599] [table] Support for aggregates in MATCH_RECOGNIZE
Date Tue, 04 Dec 2018 16:02:01 GMT
twalthr commented on a change in pull request #7177: [FLINK-7599] [table] Support for aggregates
in MATCH_RECOGNIZE
URL: https://github.com/apache/flink/pull/7177#discussion_r238706596
 
 

 ##########
 File path: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/AggregateUtil.scala
 ##########
 @@ -726,13 +727,14 @@ object AggregateUtil {
     tableConfig: TableConfig): MapPartitionFunction[Row, Row] = {
 
     val needRetract = false
-    val (aggFieldIndexes, aggregates, isDistinctAggs, accTypes, _) = transformToAggregateFunctions(
+    val aggregateMetadata = extractAggregateMetadata(
       namedAggregates.map(_.getKey),
       physicalInputRowType,
       needRetract,
       tableConfig)
 
-    val aggMapping = aggregates.indices.map(_ + groupings.length).toArray
+    val aggMapping = (0 until aggregateMetadata.getAggregateCallsCount).map(_ + groupings.length)
 
 Review comment:
   This occurs quite often (I counted 10 times). Maybe create helper function in `AggregateMetadata`
that takes the grouping length such as `getAdjustedMapping()`?

----------------------------------------------------------------
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