You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by "wind.fly.vip@outlook.com" <wi...@outlook.com> on 2021/01/13 08:10:42 UTC

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

各位大佬好, 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 的返回类型相互影响。。