flink 1.12.0 报MaxWithRetractAggFunction$MaxWithRetractAccumulatr$Converter.toInternal java.lang.interger cannot to org.apache.flink.table.data.StringData异常

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

flink 1.12.0 报MaxWithRetractAggFunction$MaxWithRetractAccumulatr$Converter.toInternal java.lang.interger cannot to org.apache.flink.table.data.StringData异常

junbaozhang
各位大佬好, flink 升级1.12.0,在使用类似如下语句时
select trade_id,sku_id,max(case f= 1 then 'aaa' else '' end ) as a,max(case f=2 then 10 else 0 end) as b from order group by trade_id,sku_id
出现 MaxWithRetractAggFunction$MaxWithRetractAccumulatr$Converter.toInternal java.lang.interger cannot to org.apache.flink.table.data.StringData
错误

将 sql 改成
select trade_id,sku_id,min(case f= 1 then 'aaa' else '' end ) as a,max(case f=2 then 10 else 0 end) as b from order group by trade_id,sku_id

select trade_id,sku_id,max(case f= 1 then 'aaa' else '' end ) as a from order group by trade_id,sku_id

select trade_id,sku_id,max(case f=2 then 10 else 0 end) as b from order group by trade_id,sku_id

都是正常的。能给指点一下排查思路吗?感觉两个MAX 的返回类型相互影响。。
junbaozhang