[ https://issues.apache.org/jira/browse/FLINK-36423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17886826#comment-17886826 ]
xuhuang commented on FLINK-36423: --------------------------------- I found the reduce and aggregate on KeyedPartitionWindowedStream has the same question, the reason of this two is the WindowOperator does not import rich reduce function and rich aggregate function, i don't know why so i haven't change it. I found that the _reduce_ and _aggregate_ operations on the _KeyedPartitionWindowedStream_ have a similar issue. The reason for this is that the _WindowOperator_ does not support rich reduce function and rich aggregate function. See org.apache.flink.streaming.runtime.operators.windowing.WindowOperatorBuilder#reduce I am unsure of the specific reason for this, and as a result, I have not made any changes to it. > Support RichMapPartitionFunction on KeyedPartitionWindowedStream > ---------------------------------------------------------------- > > Key: FLINK-36423 > URL: https://issues.apache.org/jira/browse/FLINK-36423 > Project: Flink > Issue Type: Bug > Reporter: xuhuang > Priority: Minor > > In cases like the one below, the {{open}} method of the > RichMapPartitionFunction not be called, which can lead to unexpected errors > such as Null Pointer Error. > > source.keyBy(xxxx).fullWindowPartition().mapPartition( > new RichMapPartition(xxxx) { > public void open(context){ > // some init operations, like object creation > } > > public void mapPartition(xxxx){ > // actual computation logical > } > } > ) -- This message was sent by Atlassian Jira (v8.20.10#820010)