[
https://issues.apache.org/jira/browse/FLINK-7599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16708929#comment-16708929
]
ASF GitHub Bot commented on FLINK-7599:
---------------------------------------
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:
[email protected]
> Support aggregation functions in the define and measures clause of
> MatchRecognize
> ---------------------------------------------------------------------------------
>
> Key: FLINK-7599
> URL: https://issues.apache.org/jira/browse/FLINK-7599
> Project: Flink
> Issue Type: Sub-task
> Components: CEP, Table API & SQL
> Reporter: Dian Fu
> Assignee: Dawid Wysakowicz
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.8.0
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)