NLPchina / elasticsearch-sql

Use SQL to query Elasticsearch
Apache License 2.0
6.99k stars 1.54k forks source link

union 两个count查询时报错 #1230

Open AqooDer opened 11 months ago

AqooDer commented 11 months ago

sql:select count() as totle from user where state in(1,8) union select count() as totle from user where state in(2,3,4)
报错信息:Caused by: java.lang.NullPointerException at org.nlpcn.es4sql.Util.clearEmptyPaths(Util.java:222) at org.elasticsearch.plugin.nlpcn.UnionExecutor.updateFieldNamesToAlias(UnionExecutor.java:90) at org.elasticsearch.plugin.nlpcn.UnionExecutor.fillInternalSearchHits(UnionExecutor.java:55) at org.elasticsearch.plugin.nlpcn.UnionExecutor.run(UnionExecutor.java:40) at org.elasticsearch.plugin.nlpcn.QueryActionElasticExecutor.executeMultiQueryAction(QueryActionElasticExecutor.java:78) at org.elasticsearch.plugin.nlpcn.QueryActionElasticExecutor.executeAnyAction(QueryActionElasticExecutor.java:90)

shi-yuan commented 9 months ago

count(*)再union,目前是不支持的

AqooDer commented 8 months ago

这个会考虑去实现么?

shi-yuan commented 7 months ago

后期会修复的