码上敲享录 > 大数据常见问题解答 > TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:IllegalStateException: null

TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:IllegalStateException: null

上一章章节目录下一章 2022-09-10已有153人阅读 评论(0)

TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:IllegalStateException: null


解决方法:

select t1.citycode,count(distinct t1.cardno,t1.ndate) cnt,round(sum(t1.amount),2) amount from t2

inner join t1 on t1.cardno = t2.cardno

group by citycode

执行以上sql报错如下:

SQL 错误 [500051] [HY000]: [Cloudera][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:IllegalStateException: null


后来调整count(distinct t1.cardno,t1.ndate) cnt到最后位置就没问题:

select t1.citycode,round(sum(t1.amount),2) amount,count(distinct t1.cardno,t1.ndate) cnt from t2

inner join t1 on t1.cardno = t2.cardno

group by citycode


向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交