HI: 我在使用kylin执行查询的时候遇到了“null while executing SQL”的错误,确认了我的cube中存在当前要查询的segment,并且执行其他的查询可以成功。另外我用相同的sql对其他日期的的segment进行查询可以成功。以下是我执行的sql代码(重要部分做了处理)。 SQL:selectcase when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01'when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02'when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03'when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04'end,count(1),count(distinct i)from kylin_test_zhidaoapp_napistatwhere dt='20190410'and (request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1'or request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1'or request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin'or request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult')group by case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01'when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02'when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03'when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04'end
kylin webui的提示信息如下:ERROR:null while executing SQL: "select count(1), count(distinct i) from kylin_zhidaoapp_napistat where dt='20190410' and (request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' or request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' or request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' or request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult') group by case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then '拍搜结果页同步练习展现' when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then '拍搜结果页同步练习点击' when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then '开始练习点击' when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then '提交练习' end LIMIT 50000" 将where后面的条件换种写法执行成功: selectcase when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01'when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02'when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03'when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04'end,count(1),count(distinct i)from kylin_test_zhidaoapp_napistatwhere(dt='20190410' and request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1')or (dt='20190410' and request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1')or (dt='20190410' and request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin')or (dt='20190410' and request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult')group by case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01'when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02'when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03'when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04'end 补充: 我的集群架构是:kylin+hbase+hadoop,以下是版本信息kylin版本是apache-kylin-2.5.2habse版本是HBase 1.1.2.2.6.5.0-292hadoop版本是2.6.5.0-292 数据源来自hive,cube每天例行增量构建。全部数据,包括元数据都存储在habse。 每天一个segment,7天自动合并,共有3天的数据执行查询失败,既有合并的seg,也有未合并的seg。上述执行失败的查询关联的segment进行其他查询是可以成功的。查询失败的表的数据量Source Count大约18~20亿条,构建完成后的segment的size未6.3G kylin日志的错误信息如下: 2019-04-12 20:29:48,190 INFO [http-bio-7070-exec-20] service.QueryService:352 : Check query permission in 0 ms.2019-04-12 20:29:48,190 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] service.QueryService:388 : Using project: zuoye2019-04-12 20:29:48,191 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] service.QueryService:389 : The original query: selectcase when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01'when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02'when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03'when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04'end,count(1),count(distinct i)from kylin_zhidaoapp_napistatwhere dt='20190410'and (request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1'or request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1'or request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin'or request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult')group by case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01'when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02'when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03'when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04'end2019-04-12 20:29:48,196 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] service.QueryService:565 : The corrected query: select case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01' when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02' when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03' when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04' end, count(1), count(distinct i) from kylin_zhidaoapp_napistat where dt='20190410' and (request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' or request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' or request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' or request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult') group by case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01' when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02' when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03' when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04' endLIMIT 500002019-04-12 20:29:48,208 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] routing.QueryRouter:58 : Find candidates by table DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT and project=zuoye : CUBE[name=zhidaoapp_napistat_cube]2019-04-12 20:29:48,209 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] routing.QueryRouter:51 : Applying rule: class org.apache.kylin.query.routing.rules.RemoveBlackoutRealizationsRule, realizations before: [CUBE[name=zhidaoapp_napistat_cube]], realizations after: [CUBE[name=zhidaoapp_napistat_cube]]2019-04-12 20:29:48,209 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] routing.QueryRouter:51 : Applying rule: class org.apache.kylin.query.routing.rules.RemoveUncapableRealizationsRule, realizations before: [CUBE[name=zhidaoapp_napistat_cube]], realizations after: [CUBE[name=zhidaoapp_napistat_cube]]2019-04-12 20:29:48,209 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] rules.RealizationSortRule:40 : CUBE[name=zhidaoapp_napistat_cube] priority 1 cost 222. 2019-04-12 20:29:48,209 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] routing.QueryRouter:51 : Applying rule: class org.apache.kylin.query.routing.rules.RealizationSortRule, realizations before: [CUBE[name=zhidaoapp_napistat_cube]], realizations after: [CUBE[name=zhidaoapp_napistat_cube]]2019-04-12 20:29:48,210 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] routing.QueryRouter:75 : The realizations remaining: [CUBE[name=zhidaoapp_napistat_cube]],and the final chosen one for current olap context 0 is CUBE[name=zhidaoapp_napistat_cube]2019-04-12 20:29:48,241 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] enumerator.OLAPEnumerator:105 : query storage...2019-04-12 20:29:48,242 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] gtrecord.GTCubeStorageQueryBase:330 : Does not need storage aggregation2019-04-12 20:29:48,242 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] gtrecord.GTCubeStorageQueryBase:613 : exactAggregation is true, cuboid id is 450762019-04-12 20:29:48,242 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] gtrecord.GTCubeStorageQueryBase:311 : Filter column set for query: [DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_COMEFROM, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_PAGE, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_TYPE, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.DT, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_TEMPLATETYPE]2019-04-12 20:29:48,242 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] gtrecord.GTCubeStorageQueryBase:320 : Filter mask is: 450762019-04-12 20:29:48,242 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] storage.StorageContext:167 : Enabling limit push down: 50000 at level: LIMIT_ON_SCAN2019-04-12 20:29:48,242 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] gtrecord.GTCubeStorageQueryBase:497 : Aggregate partition results is not beneficial because no storage aggregation2019-04-12 20:29:48,242 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] gtrecord.GTCubeStorageQueryBase:529 : Can not push down having filter, must have only one segment2019-04-12 20:29:48,243 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] gtrecord.GTCubeStorageQueryBase:191 : Cuboid identified: cube=zhidaoapp_napistat_cube, cuboidId=45076, groupsD=[DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_COMEFROM, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_PAGE, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_TYPE, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_TEMPLATETYPE], filterD=[DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_COMEFROM, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_PAGE, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_TYPE, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.DT, DEFAULT.KYLIN_ZHIDAOAPP_NAPISTAT.REQUEST_PARAM_TEMPLATETYPE], limitPushdown=50000, limitLevel=LIMIT_ON_SCAN, storageAggr=false2019-04-12 20:29:48,243 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] common.SegmentPruner:89 : Prune segment zhidaoapp_napistat_cube[20190313000000_20190410000000] due to given filter2019-04-12 20:29:48,243 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] common.SegmentPruner:94 : Pruner passed on segment zhidaoapp_napistat_cube[20190410000000_20190411000000]2019-04-12 20:29:48,243 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] common.SegmentPruner:89 : Prune segment zhidaoapp_napistat_cube[20190411000000_20190412000000] due to given filter2019-04-12 20:29:48,243 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] gtrecord.CubeSegmentScanner:61 : Init CubeSegmentScanner for segment 20190410000000_201904110000002019-04-12 20:29:48,245 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] v2.CubeHBaseRPC:315 : hbase.rpc.timeout = 90000 ms, use 81000 ms as timeout for coprocessor2019-04-12 20:29:48,245 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] v2.CubeHBaseEndpointRPC:157 : Serialized scanRequestBytes 1582 bytes, rawScanBytesString 369 bytes2019-04-12 20:29:48,245 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] v2.CubeHBaseEndpointRPC:160 : The scan 710925bd for segment zhidaoapp_napistat_cube[20190410000000_20190411000000] is as below with 4 separate raw scans, shard part of start/end key is set to 02019-04-12 20:29:48,245 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] v2.CubeHBaseRPC:288 : Visiting hbase table KYLIN_ZY75Y7LL95: cuboid exact match, from 45076 to 45076 Start: \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x00\xE1\x09\xF2\x01\x00\x00 (\x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x00\xE1\x09\xF2\x01\x00\x00) Stop: \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x00\xE1\x09\xF2\x01\xFF\x00\x00 (\x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x00\xE1\x09\xF2\x01\xFF\x00\x00) Fuzzy key counts: 1. Fuzzy keys : \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x00\xE1\x09\xF2\x01\x00\x00 \x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00;2019-04-12 20:29:48,246 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] v2.CubeHBaseRPC:288 : Visiting hbase table KYLIN_ZY75Y7LL95: cuboid exact match, from 45076 to 45076 Start: \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02\x5A\x00\x00\x02\x00\x00 (\x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02Z\x00\x00\x02\x00\x00) Stop: \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02\x5A\xFF\xFF\x02\x00\x00\x00 (\x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02Z\xFF\xFF\x02\x00\x00\x00) Fuzzy key counts: 1. Fuzzy keys : \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02\x5A\x00\x00\x02\x00\x00 \x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00;2019-04-12 20:29:48,246 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] v2.CubeHBaseRPC:288 : Visiting hbase table KYLIN_ZY75Y7LL95: cuboid exact match, from 45076 to 45076 Start: \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02\x5B\x00\x00\x02\x00\x00 (\x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02[\x00\x00\x02\x00\x00) Stop: \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02\x5B\xFF\xFF\x02\x00\x00\x00 (\x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02[\xFF\xFF\x02\x00\x00\x00) Fuzzy key counts: 1. Fuzzy keys : \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02\x5B\x00\x00\x02\x00\x00 \x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00;2019-04-12 20:29:48,246 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] v2.CubeHBaseRPC:288 : Visiting hbase table KYLIN_ZY75Y7LL95: cuboid exact match, from 45076 to 45076 Start: \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02\x66\x09\xF3\x01\x00\x00 (\x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02f\x09\xF3\x01\x00\x00) Stop: \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02\x66\x09\xF3\x01\xFF\x00\x00 (\x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02f\x09\xF3\x01\xFF\x00\x00) Fuzzy key counts: 1. Fuzzy keys : \x00\x00\x00\x00\x00\x00\x00\x00\xB0\x14\x02\x66\x09\xF3\x01\x00\x00 \x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00;2019-04-12 20:29:48,246 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] v2.CubeHBaseEndpointRPC:167 : Submitting rpc to 8 shards starting from shard 5, scan range count 42019-04-12 20:29:48,246 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] common.KylinConfig:327 : KYLIN_CONF property was not set, will seek KYLIN_HOME env variable2019-04-12 20:29:48,247 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] gtrecord.SequentialCubeTupleIterator:73 : Using SortedIteratorMergerWithLimit to merge segment results2019-04-12 20:29:48,247 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] enumerator.OLAPEnumerator:117 : return TupleIterator...2019-04-12 20:29:48,247 INFO [kylin-coproc--pool3-t9195] v2.CubeHBaseEndpointRPC:226 : Query-af7a2b24-7c10-4ed5-9246-d0cb30b38ffb: send request to the init region server data-hadoop-12-75.bjcq.zybang.com on table KYLIN_ZY75Y7LL95 2019-04-12 20:29:48,248 INFO [kylin-coproc--pool3-t9196] v2.CubeHBaseEndpointRPC:226 : Query-af7a2b24-7c10-4ed5-9246-d0cb30b38ffb: send request to the init region server data-hadoop-12-74.bjcq.zybang.com on table KYLIN_ZY75Y7LL95 2019-04-12 20:29:48,248 INFO [kylin-coproc--pool3-t9198] v2.CubeHBaseEndpointRPC:226 : Query-af7a2b24-7c10-4ed5-9246-d0cb30b38ffb: send request to the init region server data-hadoop-12-73.bjcq.zybang.com on table KYLIN_ZY75Y7LL95 2019-04-12 20:29:48,248 INFO [kylin-coproc--pool3-t9197] v2.CubeHBaseEndpointRPC:226 : Query-af7a2b24-7c10-4ed5-9246-d0cb30b38ffb: send request to the init region server data-hadoop-12-72.bjcq.zybang.com on table KYLIN_ZY75Y7LL95 2019-04-12 20:29:48,248 INFO [kylin-coproc--pool3-t9202] v2.CubeHBaseEndpointRPC:226 : Query-af7a2b24-7c10-4ed5-9246-d0cb30b38ffb: send request to the init region server data-hadoop-12-77.bjcq.zybang.com on table KYLIN_ZY75Y7LL95 2019-04-12 20:29:48,248 INFO [kylin-coproc--pool3-t9201] v2.CubeHBaseEndpointRPC:226 : Query-af7a2b24-7c10-4ed5-9246-d0cb30b38ffb: send request to the init region server data-hadoop-12-74.bjcq.zybang.com on table KYLIN_ZY75Y7LL95 2019-04-12 20:29:48,248 INFO [kylin-coproc--pool3-t9200] v2.CubeHBaseEndpointRPC:226 : Query-af7a2b24-7c10-4ed5-9246-d0cb30b38ffb: send request to the init region server data-hadoop-12-72.bjcq.zybang.com on table KYLIN_ZY75Y7LL95 2019-04-12 20:29:48,248 INFO [kylin-coproc--pool3-t9199] v2.CubeHBaseEndpointRPC:226 : Query-af7a2b24-7c10-4ed5-9246-d0cb30b38ffb: send request to the init region server data-hadoop-12-73.bjcq.zybang.com on table KYLIN_ZY75Y7LL95 2019-04-12 20:29:48,298 INFO [kylin-coproc--pool3-t9197] v2.CubeHBaseEndpointRPC:293 : <sub-thread for Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb GTScanRequest 710925bd>Endpoint RPC returned from HTable KYLIN_ZY75Y7LL95 Shard \x4B\x59\x4C\x49\x4E\x5F\x5A\x59\x37\x35\x59\x37\x4C\x4C\x39\x35\x2C\x00\x06\x2C\x31\x35\x35\x34\x39\x37\x31\x37\x35\x37\x34\x31\x31\x2E\x65\x38\x39\x61\x64\x64\x39\x34\x31\x39\x63\x39\x61\x65\x66\x31\x30\x31\x64\x65\x65\x33\x33\x30\x39\x34\x30\x65\x39\x34\x37\x35\x2E on host: data-hadoop-12-72.bjcq.zybang.com.Total scanned row: 0. Total scanned bytes: 0. Total filtered row: 0. Total aggred row: 0. Time elapsed in EP: 39(ms). Server CPU usage: 0.011724238387283746, server physical mem left: 1.11505408E9, server swap mem left:0.0.Etc message: start latency: 12@0,agg done@36,compress done@36,server stats done@39, debugGitTag:0e519d859e217fbfadd534313376e532d2c647fa;.Normal Complete: true.Compressed row size: 82019-04-12 20:29:48,298 DEBUG [kylin-coproc--pool3-t9197] util.CompressionUtils:67 : Original: 8 bytes. Decompressed: 0 bytes. Time: 02019-04-12 20:29:48,342 INFO [kylin-coproc--pool3-t9195] v2.CubeHBaseEndpointRPC:293 : <sub-thread for Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb GTScanRequest 710925bd>Endpoint RPC returned from HTable KYLIN_ZY75Y7LL95 Shard \x4B\x59\x4C\x49\x4E\x5F\x5A\x59\x37\x35\x59\x37\x4C\x4C\x39\x35\x2C\x00\x05\x2C\x31\x35\x35\x34\x39\x37\x31\x37\x35\x37\x34\x31\x31\x2E\x64\x66\x61\x61\x36\x33\x36\x30\x66\x38\x62\x32\x31\x35\x65\x39\x66\x66\x34\x38\x37\x35\x36\x62\x33\x63\x36\x39\x39\x32\x34\x30\x2E on host: data-hadoop-12-75.bjcq.zybang.com.Total scanned row: 0. Total scanned bytes: 0. Total filtered row: 0. Total aggred row: 0. Time elapsed in EP: 81(ms). Server CPU usage: 0.006755215685739637, server physical mem left: 5.6659750912E10, server swap mem left:0.0.Etc message: start latency: 15@1,agg done@79,compress done@79,server stats done@81, debugGitTag:0e519d859e217fbfadd534313376e532d2c647fa;.Normal Complete: true.Compressed row size: 82019-04-12 20:29:48,343 DEBUG [kylin-coproc--pool3-t9195] util.CompressionUtils:67 : Original: 8 bytes. Decompressed: 0 bytes. Time: 02019-04-12 20:29:48,548 INFO [kylin-coproc--pool3-t9199] v2.CubeHBaseEndpointRPC:293 : <sub-thread for Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb GTScanRequest 710925bd>Endpoint RPC returned from HTable KYLIN_ZY75Y7LL95 Shard \x4B\x59\x4C\x49\x4E\x5F\x5A\x59\x37\x35\x59\x37\x4C\x4C\x39\x35\x2C\x00\x07\x2C\x31\x35\x35\x34\x39\x37\x31\x37\x35\x37\x34\x31\x31\x2E\x38\x38\x38\x66\x64\x65\x31\x37\x34\x35\x39\x66\x34\x36\x61\x39\x35\x66\x33\x32\x31\x30\x31\x61\x35\x64\x33\x34\x30\x34\x61\x32\x2E on host: data-hadoop-12-73.bjcq.zybang.com.Total scanned row: 1. Total scanned bytes: 39281. Total filtered row: 0. Total aggred row: 0. Time elapsed in EP: 284(ms). Server CPU usage: 0.0109306358863681, server physical mem left: 1.57190144E9, server swap mem left:0.0.Etc message: start latency: 17@1,agg done@281,compress done@282,server stats done@284, debugGitTag:0e519d859e217fbfadd534313376e532d2c647fa;.Normal Complete: true.Compressed row size: 272019-04-12 20:29:48,548 DEBUG [kylin-coproc--pool3-t9199] util.CompressionUtils:67 : Original: 27 bytes. Decompressed: 22 bytes. Time: 02019-04-12 20:29:48,690 INFO [kylin-coproc--pool3-t9200] v2.CubeHBaseEndpointRPC:293 : <sub-thread for Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb GTScanRequest 710925bd>Endpoint RPC returned from HTable KYLIN_ZY75Y7LL95 Shard \x4B\x59\x4C\x49\x4E\x5F\x5A\x59\x37\x35\x59\x37\x4C\x4C\x39\x35\x2C\x00\x02\x2C\x31\x35\x35\x34\x39\x37\x31\x37\x35\x37\x34\x31\x31\x2E\x35\x61\x31\x32\x31\x39\x39\x31\x62\x38\x36\x35\x32\x64\x34\x35\x62\x37\x65\x62\x63\x66\x36\x35\x35\x61\x63\x65\x33\x65\x39\x35\x2E on host: data-hadoop-12-72.bjcq.zybang.com.Total scanned row: 2. Total scanned bytes: 10168802. Total filtered row: 0. Total aggred row: 0. Time elapsed in EP: 429(ms). Server CPU usage: 0.01452991452991453, server physical mem left: 1.114497024E9, server swap mem left:0.0.Etc message: start latency: 15@0,agg done@426,compress done@426,server stats done@429, debugGitTag:0e519d859e217fbfadd534313376e532d2c647fa;.Normal Complete: true.Compressed row size: 412019-04-12 20:29:48,691 DEBUG [kylin-coproc--pool3-t9200] util.CompressionUtils:67 : Original: 41 bytes. Decompressed: 44 bytes. Time: 02019-04-12 20:29:48,701 INFO [kylin-coproc--pool3-t9198] v2.CubeHBaseEndpointRPC:293 : <sub-thread for Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb GTScanRequest 710925bd>Endpoint RPC returned from HTable KYLIN_ZY75Y7LL95 Shard \x4B\x59\x4C\x49\x4E\x5F\x5A\x59\x37\x35\x59\x37\x4C\x4C\x39\x35\x2C\x00\x01\x2C\x31\x35\x35\x34\x39\x37\x31\x37\x35\x37\x34\x31\x31\x2E\x36\x66\x32\x31\x36\x32\x35\x33\x62\x63\x65\x38\x36\x33\x32\x61\x35\x37\x35\x33\x64\x34\x31\x65\x37\x61\x66\x31\x62\x37\x32\x35\x2E on host: data-hadoop-12-73.bjcq.zybang.com.Total scanned row: 0. Total scanned bytes: 0. Total filtered row: 0. Total aggred row: 0. Time elapsed in EP: 439(ms). Server CPU usage: 0.02178649237472767, server physical mem left: 1.572483072E9, server swap mem left:0.0.Etc message: start latency: 15@0,agg done@437,compress done@437,server stats done@439, debugGitTag:0e519d859e217fbfadd534313376e532d2c647fa;.Normal Complete: true.Compressed row size: 82019-04-12 20:29:48,701 DEBUG [kylin-coproc--pool3-t9198] util.CompressionUtils:67 : Original: 8 bytes. Decompressed: 0 bytes. Time: 02019-04-12 20:29:48,725 INFO [kylin-coproc--pool3-t9196] v2.CubeHBaseEndpointRPC:293 : <sub-thread for Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb GTScanRequest 710925bd>Endpoint RPC returned from HTable KYLIN_ZY75Y7LL95 Shard \x4B\x59\x4C\x49\x4E\x5F\x5A\x59\x37\x35\x59\x37\x4C\x4C\x39\x35\x2C\x2C\x31\x35\x35\x34\x39\x37\x31\x37\x35\x37\x34\x31\x31\x2E\x64\x64\x37\x36\x39\x39\x61\x64\x38\x37\x32\x32\x64\x64\x61\x38\x62\x36\x63\x31\x39\x65\x62\x64\x36\x37\x33\x65\x37\x36\x37\x64\x2E on host: data-hadoop-12-74.bjcq.zybang.com.Total scanned row: 0. Total scanned bytes: 0. Total filtered row: 0. Total aggred row: 0. Time elapsed in EP: 463(ms). Server CPU usage: 0.006412519298160557, server physical mem left: 5.6458817536E10, server swap mem left:0.0.Etc message: start latency: 15@1,agg done@460,compress done@460,server stats done@463, debugGitTag:0e519d859e217fbfadd534313376e532d2c647fa;.Normal Complete: true.Compressed row size: 82019-04-12 20:29:48,725 DEBUG [kylin-coproc--pool3-t9196] util.CompressionUtils:67 : Original: 8 bytes. Decompressed: 0 bytes. Time: 02019-04-12 20:29:48,939 INFO [kylin-coproc--pool3-t9202] v2.CubeHBaseEndpointRPC:293 : <sub-thread for Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb GTScanRequest 710925bd>Endpoint RPC returned from HTable KYLIN_ZY75Y7LL95 Shard \x4B\x59\x4C\x49\x4E\x5F\x5A\x59\x37\x35\x59\x37\x4C\x4C\x39\x35\x2C\x00\x09\x2C\x31\x35\x35\x34\x39\x37\x31\x37\x35\x37\x34\x31\x31\x2E\x30\x62\x61\x32\x31\x64\x65\x39\x34\x34\x32\x34\x33\x64\x64\x35\x35\x38\x30\x65\x63\x36\x31\x31\x64\x61\x61\x31\x64\x37\x38\x61\x2E on host: data-hadoop-12-77.bjcq.zybang.com.Total scanned row: 0. Total scanned bytes: 0. Total filtered row: 0. Total aggred row: 0. Time elapsed in EP: 679(ms). Server CPU usage: 0.00999617193688623, server physical mem left: 6.921129984E9, server swap mem left:0.0.Etc message: start latency: 13@0,agg done@676,compress done@676,server stats done@679, debugGitTag:0e519d859e217fbfadd534313376e532d2c647fa;.Normal Complete: true.Compressed row size: 82019-04-12 20:29:48,939 DEBUG [kylin-coproc--pool3-t9202] util.CompressionUtils:67 : Original: 8 bytes. Decompressed: 0 bytes. Time: 02019-04-12 20:29:49,525 INFO [kylin-coproc--pool3-t9201] v2.CubeHBaseEndpointRPC:293 : <sub-thread for Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb GTScanRequest 710925bd>Endpoint RPC returned from HTable KYLIN_ZY75Y7LL95 Shard \x4B\x59\x4C\x49\x4E\x5F\x5A\x59\x37\x35\x59\x37\x4C\x4C\x39\x35\x2C\x00\x08\x2C\x31\x35\x35\x34\x39\x37\x31\x37\x35\x37\x34\x31\x31\x2E\x65\x30\x38\x38\x35\x30\x31\x62\x66\x30\x35\x64\x37\x31\x35\x63\x35\x30\x34\x34\x32\x61\x63\x33\x30\x36\x32\x32\x33\x37\x31\x62\x2E on host: data-hadoop-12-74.bjcq.zybang.com.Total scanned row: 1. Total scanned bytes: 149688. Total filtered row: 0. Total aggred row: 0. Time elapsed in EP: 1260(ms). Server CPU usage: 0.0033402922755741125, server physical mem left: 5.6459423744E10, server swap mem left:0.0.Etc message: start latency: 18@0,agg done@1257,compress done@1257,server stats done@1260, debugGitTag:0e519d859e217fbfadd534313376e532d2c647fa;.Normal Complete: true.Compressed row size: 272019-04-12 20:29:49,525 DEBUG [kylin-coproc--pool3-t9201] util.CompressionUtils:67 : Original: 27 bytes. Decompressed: 23 bytes. Time: 02019-04-12 20:29:49,525 DEBUG [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] gtrecord.SortMergedPartitionResultIterator:76 : Using SortMergedPartitionResultIterator to merge 3 partition results out of 8 partitions2019-04-12 20:29:49,530 ERROR [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] service.QueryService:482 : Exception while executing queryjava.sql.SQLException: Error while executing SQL "select case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01' when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02' when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03' when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04' end, count(1), count(distinct i) from kylin_zhidaoapp_napistat where dt='20190410' and (request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' or request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' or request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' or request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult') group by case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01' when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02' when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03' when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04' endLIMIT 50000": null at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:156) at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:218) at org.apache.kylin.rest.service.QueryService.executeRequest(QueryService.java:883) at org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:586) at org.apache.kylin.rest.service.QueryService.query(QueryService.java:206) at org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:445) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:414) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:353) at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:87) at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209) at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1137) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748)Caused by: java.lang.NullPointerException2019-04-12 20:29:49,532 INFO [Query af7a2b24-7c10-4ed5-9246-d0cb30b38ffb-6452] service.QueryService:346 : ==========================[QUERY]===============================Query Id: af7a2b24-7c10-4ed5-9246-d0cb30b38ffbSQL: selectcase when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01'when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02'when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03'when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04'end,count(1),count(distinct i)from kylin_zhidaoapp_napistatwhere dt='20190410'and (request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1'or request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1'or request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin'or request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult')group by case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01'when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02'when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03'when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04'endUser: ADMINSuccess: falseDuration: 1.342Project: zuoyeRealization Names: [CUBE[name=zhidaoapp_napistat_cube]]Cuboid Ids: [45076]Total scan count: 4Total scan bytes: 10357771Result row count: 0Accept Partial: trueIs Partial Result: falseHit Exception Cache: falseStorage cache used: falseIs Query Push-Down: falseIs Prepare: falseTrace URL: nullMessage: nullwhile executing SQL: "select case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01' when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02' when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03' when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04' end, count(1), count(distinct i) from kylin_zhidaoapp_napistat where dt='20190410' and (request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' or request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' or request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' or request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult') group by case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01' when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02' when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03' when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04' end LIMIT 50000"==========================[QUERY]=============================== 2019-04-12 20:29:49,533 ERROR [http-bio-7070-exec-20] controller.BasicController:63 : org.apache.kylin.rest.exception.InternalErrorException: nullwhile executing SQL: "select case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01' when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02' when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03' when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04' end, count(1), count(distinct i) from kylin_zhidaoapp_napistat where dt='20190410' and (request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' or request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' or request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' or request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult') group by case when request_param_type='recommendedShow' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test01' when request_param_type='recommendedClick' and request_param_comeFrom='searchResult' and request_param_templateType='1' then 'test02' when request_param_type='begin_click' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeBegin' then 'test03' when request_param_type='result_page_show' and request_param_comeFrom='searchRecord' and request_param_page='practice-vue/syncPracticeResult' then 'test04' end LIMIT 50000" at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:426) at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:353) at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:87) at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209) at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1137) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) 另外,在以前也遇到过很类似的问题,sql where后的条件换中写法就可以执行成功: 失败的SQL: select count(1),count(distinct i),case when kv_name='ASK_TOOLS_CHINESE_COMPOSITION_CLICK' then 'TEST01'when kv_name='CHINESE_COMPOSITION_SEARCH_BUTTON_CLICK' then 'TEST02'when kv_name in('CHINESE_COMPOSITION_HOT_SEARCH_CLICK','COMPOSITION_KEYWORD_CLICK') then 'TEST03'when kv_name='COMPOSITION_MARITERIAL_ENTRANCE_CLICK' then 'TEST04'when kv_name='CHINESE_COMPOSITION_UNIT_COMPOSITION_CLICK' then 'TEST05'when kv_name in('COMPOSITION_CIRCLE_ENTRANCE_CLICK','COMPOSITION_CIRCLE_VIEW_ALL_CLICK') then 'TEST06'when kv_name='COMPOSITION_COLLECT_CHINESE_ENTRANCE_ONCLICK' then 'TEST07'end as actionfrom kylin_test_offline_actionwhere dt='20190122' and kv_name in ('ASK_TOOLS_CHINESE_COMPOSITION_CLICK','CHINESE_COMPOSITION_SEARCH_BUTTON_CLICK','CHINESE_COMPOSITION_HOT_SEARCH_CLICK','COMPOSITION_KEYWORD_CLICK','COMPOSITION_MARITERIAL_ENTRANCE_CLICK','CHINESE_COMPOSITION_UNIT_COMPOSITION_CLICK', 'COMPOSITION_CIRCLE_ENTRANCE_CLICK','COMPOSITION_COLLECT_CHINESE_ENTRANCE_ONCLICK','COMPOSITION_CIRCLE_ENTRANCE_CLICK','COMPOSITION_CIRCLE_VIEW_ALL_CLICK')group by case when kv_name='ASK_TOOLS_CHINESE_COMPOSITION_CLICK' then 'TEST01'when kv_name='CHINESE_COMPOSITION_SEARCH_BUTTON_CLICK' then 'TEST02'when kv_name in('CHINESE_COMPOSITION_HOT_SEARCH_CLICK','COMPOSITION_KEYWORD_CLICK') then 'TEST03'when kv_name='COMPOSITION_MARITERIAL_ENTRANCE_CLICK' then 'TEST04'when kv_name='CHINESE_COMPOSITION_UNIT_COMPOSITION_CLICK' then 'TEST05'when kv_name in('COMPOSITION_CIRCLE_ENTRANCE_CLICK','COMPOSITION_CIRCLE_VIEW_ALL_CLICK') then 'TEST06'when kv_name='COMPOSITION_COLLECT_CHINESE_ENTRANCE_ONCLICK' then 'TEST07'end 成功的SQL: select count(1),count(distinct i),case when kv_name='ASK_TOOLS_CHINESE_COMPOSITION_CLICK' then 'TEST01'when kv_name='CHINESE_COMPOSITION_SEARCH_BUTTON_CLICK' then 'TEST02'when kv_name in('CHINESE_COMPOSITION_HOT_SEARCH_CLICK','COMPOSITION_KEYWORD_CLICK') then 'TEST03'when kv_name='COMPOSITION_MARITERIAL_ENTRANCE_CLICK' then 'TEST04'when kv_name='CHINESE_COMPOSITION_UNIT_COMPOSITION_CLICK' then 'TEST05'when kv_name in('COMPOSITION_CIRCLE_ENTRANCE_CLICK','COMPOSITION_CIRCLE_VIEW_ALL_CLICK') then 'TEST06'when kv_name='COMPOSITION_COLLECT_CHINESE_ENTRANCE_ONCLICK' then 'TEST07'end as actionfrom kylin_test_offline_actionwhere (dt='20190122' and kv_name='ASK_TOOLS_CHINESE_COMPOSITION_CLICK')or (dt='20190122' and kv_name='CHINESE_COMPOSITION_SEARCH_BUTTON_CLICK')or (dt='20190122' and kv_name in('CHINESE_COMPOSITION_HOT_SEARCH_CLICK','COMPOSITION_KEYWORD_CLICK'))or (dt='20190122' and kv_name='COMPOSITION_MARITERIAL_ENTRANCE_CLICK')or (dt='20190122' and kv_name='CHINESE_COMPOSITION_UNIT_COMPOSITION_CLICK')or (dt='20190122' and kv_name in('COMPOSITION_CIRCLE_ENTRANCE_CLICK','COMPOSITION_CIRCLE_VIEW_ALL_CLICK'))or (dt='20190122' and kv_name='COMPOSITION_COLLECT_CHINESE_ENTRANCE_ONCLICK')group by case when kv_name='ASK_TOOLS_CHINESE_COMPOSITION_CLICK' then 'TEST01'when kv_name='CHINESE_COMPOSITION_SEARCH_BUTTON_CLICK' then 'TEST02'when kv_name in('CHINESE_COMPOSITION_HOT_SEARCH_CLICK','COMPOSITION_KEYWORD_CLICK') then 'TEST03'when kv_name='COMPOSITION_MARITERIAL_ENTRANCE_CLICK' then 'TEST04'when kv_name='CHINESE_COMPOSITION_UNIT_COMPOSITION_CLICK' then 'TEST05'when kv_name in('COMPOSITION_CIRCLE_ENTRANCE_CLICK','COMPOSITION_CIRCLE_VIEW_ALL_CLICK') then 'TEST06'when kv_name='COMPOSITION_COLLECT_CHINESE_ENTRANCE_ONCLICK' then 'TEST07'end