[ 
https://issues.apache.org/jira/browse/FLINK-22455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flink Jira Bot updated FLINK-22455:
-----------------------------------
      Labels: auto-deprioritized-major auto-deprioritized-minor  (was: 
auto-deprioritized-major stale-minor)
    Priority: Not a Priority  (was: Minor)

This issue was labeled "stale-minor" 7 days ago and has not received any 
updates so it is being deprioritized. If this ticket is actually Minor, please 
raise the priority and ask a committer to assign you the issue or revive the 
public discussion.


> FlinkRelBuilder#windowAggregate will throw ClassCastException when function 
> reuse
> ---------------------------------------------------------------------------------
>
>                 Key: FLINK-22455
>                 URL: https://issues.apache.org/jira/browse/FLINK-22455
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>            Reporter: tartarus
>            Priority: Not a Priority
>              Labels: auto-deprioritized-major, auto-deprioritized-minor
>         Attachments: FlinkRelBuilderTest.scala
>
>
> If the input parameter aggCalls of FlinkRelBuilder#windowAggregate contains 
> the same aggregate function. Then it will throw ClassCastException, because 
> of the optimization of aggregate function reuse. We did not judge the return 
> value type, but direct type conversion;
> {code:java}
>     val aggregate = super.transform(
>       new UnaryOperator[RelBuilder.Config] {
>         override def apply(t: RelBuilder.Config)
>           : RelBuilder.Config = t.withPruneInputOfAggregate(false)
>       })
>       .push(build())
>       .aggregate(groupKey, aggCalls)
>       .build()
>       .asInstanceOf[LogicalAggregate]
> {code}
> I wrote a test that triggered this problem.
> You can use the attached code to reproduce this problem.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to