[ https://issues.apache.org/jira/browse/FLINK-8689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16394805#comment-16394805 ]
ASF GitHub Bot commented on FLINK-8689: --------------------------------------- Github user walterddr commented on the issue: https://github.com/apache/flink/pull/5555 Thanks @hequn8128 for the prompt review. Are you suggesting we created the mapView parallel with the accumulator? The reason why I kept `DistinctAccumulator` is to act as a delegate to enclose the actual accumulator so that it can be passed around in the `accumulatorState` field without extending the arity. I guess if we separate the mapView with the accumulator. I guess I can separately create another field in the `accumulatorState` `Row` to store the `mapView`(s)... This way it might be easier to handle the "reuse same mapView for multiple different distinct agg function" case as we discussed in the doc. Another question is I was trying to reuse as much utility of dataview codegen as possible, as most of them are tightly coupled with the accumulators. I guess I can further refactor (which I already did quite a bit already). Please let me know if that's what you had in mind @hequn8128 -- Rong > Add runtime support of distinct filter using MapView > ----------------------------------------------------- > > Key: FLINK-8689 > URL: https://issues.apache.org/jira/browse/FLINK-8689 > Project: Flink > Issue Type: Sub-task > Reporter: Rong Rong > Assignee: Rong Rong > Priority: Major > > This ticket should cover distinct aggregate function support to codegen for > *AggregateCall*, where *isDistinct* fields is set to true. > This can be verified using the following SQL, which is not currently > producing correct results. > {code:java} > SELECT > a, > SUM(b) OVER (PARTITION BY a ORDER BY proctime ROWS BETWEEN 5 PRECEDING AND > CURRENT ROW) > FROM > MyTable{code} > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)