Apache Doris 中文技术论坛
Questions Tags Users Badges

doris2.0.4版本,使用case...when语句时,语句中的column=''语法报错执行sql异常errCode = 2, detailMessage = Unexpected exception: null

Asked Oct 28, 2024 Modified Oct 28, 2024
Viewed 144
query 2.0

sql语句:select sum(case when (ID is null or ID = '') then 1 else 0 end) as num from (select * from TABLE_AAA) tt

报错:sql异常errCode = 2, detailMessage = Unexpected exception: null

使用explain也报错!
企业微信截图_17301057369310.png

edited Oct 28, 2024
lite1113
asked Oct 28, 2024
2 Answers

show variables like "%ner%"; 看下:
experimental_enable_nereids_planner是true还是false。

打开关闭分别测试下的

edited Jan 1, 1970
阿渊@SelectDB (没回帖直接加我主页微信)9520
answered Oct 29, 2024

2.0的哪个版本呢,走的什么优化器,explain $SQL 看下的

edited Jan 1, 1970
阿渊@SelectDB (没回帖直接加我主页微信)9520
answered Oct 28, 2024
Related Questions
get_json_string/json_extract 在不同的Doris版本中结果不一致
1 answers
Doris4.0.2版本,集群部署模式3台主机,不稳定,经常报错。insert报failed to write enough replicas 0/1 for tablet,select查询也报错
1 answers
倒排索引match返回结果不正确
1 answers
[Bug] Arrow Flight SQL 在大数据量下出现 StringArray 偏移量损坏与内存越界
Doris无法查询information_schema.tables表信息
1 answers
flink-doris-connector-1.20.24.0.0 2pc ,checkpoint处恢复数据重复
1 answers

Terms of service Privacy policy

Powered by Answer - the open-source software that powers Q&A communities.
Made with love © 2026 Apache Doris 中文技术论坛.