flink Unsupported operand types: IF(boolean, NULL, String)

问题:业务方存储了NULL 字符串,需要处理为 null

sql 复制代码
select if('a'='null',null,'a');

结果遇到了 Unsupported operand types: IF(boolean, NULL, String),根据报错反馈,很明显应该是没有对 null 自动转换(Spark 是会自动转的)

源码:

if 的源码我以前看过,就是calcyte自动生成的,在org.apache.flink.table.planner.codegen.calls 的 IfCallGen 类

确实没办法了,只能

sql 复制代码
select if(a='null',cast(null as string),'a')
相关推荐
snow@li2 分钟前
Java:理解 Gradle / 后端项目的管家 / 打包SpringBoot 应用 / 完成编译、下载依赖、运行测试、打包 JAR/WAR / 速查表
java
云烟成雨TD14 分钟前
Spring AI 1.x 系列【57】动态工具发现:Tool Search Tool
java·人工智能·spring
zfoo-framework31 分钟前
[修改代码使用]codex官方app中使用中转(不需要cc-switch) 1.config.toml 2.sk方式登录
java
逍遥德1 小时前
MQTT教程详解-05.SpringBoot集成mqtt client 性能分析
java·spring boot·spring·mt
云烟成雨TD1 小时前
Spring AI 1.x 系列【54】Retry 机制分析
java·人工智能·spring
weixin_523185321 小时前
Collections.unmodifiableMap详解:真的不可修改吗?
java·linux·前端
点燃大海1 小时前
SpringAI构建智能体
java·spring boot·spring·springai智能体
xier_ran1 小时前
【infra之路】02_RadixAttention与KV_Cache管理
java·spring boot·spring
黑马师兄1 小时前
RAG混合检索深度解析:让AI真正找到你要的内容
java·人工智能·ai·agent·rag·ai-native
码客日记1 小时前
Spring Boot 配置文件敏感信息加密(Jasypt 企业级完整方案)
java·spring boot·git