[ 
https://issues.apache.org/jira/browse/KYLIN-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16394374#comment-16394374
 ] 

Shaofeng SHI commented on KYLIN-3285:
-------------------------------------

>From the log, the root cause is a value not be encoded by the dictionary. The 
>value '2018-03-01' is the start of a cube segment; The partition col 
>'day_time' is in type of "string", and the selected encoding is "dict". But as 
>Xixin mentioned, there is records for '2018-03-01'. Need further 
>inviestigation about how "shard by" can impact on this.

 
{code:java}
Caused by: java.lang.IllegalArgumentException: Column 1 value '2018-03-01' met 
dictionary error: Value '2018-03-01' (2018-03-01) not exists!
at 
org.apache.kylin.dict.TrieDictionaryForest.getIdFromValueBytesWithoutCache(TrieDictionaryForest.java:127)
at 
org.apache.kylin.dict.CacheDictionary.getIdFromValueImpl(CacheDictionary.java:63)
at org.apache.kylin.common.util.Dictionary.getIdFromValue(Dictionary.java:102)
at 
org.apache.kylin.dimension.DictionaryDimEnc$DictionarySerializer.serialize(DictionaryDimEnc.java:127)
at 
org.apache.kylin.cube.gridtable.CubeCodeSystem.encodeColumnValue(CubeCodeSystem.java:124)
at 
org.apache.kylin.cube.gridtable.SegmentGTStartAndEnd.encodeTime(SegmentGTStartAndEnd.java:85)
at 
org.apache.kylin.cube.gridtable.SegmentGTStartAndEnd.getSegmentStartAndEnd(SegmentGTStartAndEnd.java:51)
at 
org.apache.kylin.storage.gtrecord.CubeScanRangePlanner.<init>(CubeScanRangePlanner.java:114)
at 
org.apache.kylin.storage.gtrecord.CubeSegmentScanner.<init>(CubeSegmentScanner.java:73)
at 
org.apache.kylin.storage.gtrecord.GTCubeStorageQueryBase.search(GTCubeStorageQueryBase.java:93)
at 
org.apache.kylin.query.enumerator.OLAPEnumerator.queryStorage(OLAPEnumerator.java:117)
at 
org.apache.kylin.query.enumerator.OLAPEnumerator.moveNext(OLAPEnumerator.java:62)
{code}

>  "Value NNN not exists" error run executing query
> -------------------------------------------------
>
>                 Key: KYLIN-3285
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3285
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v2.3.0
>            Reporter: Shaofeng SHI
>            Priority: Major
>         Attachments: cube (1).json, kylin.log
>
>
> Reported by community user zxxb...@163.com:
>  
> {color:#b94a48}Kylin version update from 2.2.0 to 2.3.0; cube was build 
> before update, and query without error.{color}
> {color:#b94a48}After updatge to version 2.3.0 and query {color}"select 
> count(userid) num,day_time from record_ap group by day_time LIMIT 
> 1000{color:#b94a48}”{color}
> {color:#b94a48}show errors below:{color}
> Column 0 value '2018-03-06' met dictionary error: Value '2018-03-06' 
> (2018-03-06) not exists! while executing SQL: "select count(userid) 
> num,day_time from record_ap group by day_time LIMIT 1000”
>  
> {color:#b94a48}Where {color}{color:#b94a48}'2018-03-06’ come from? I was 
> fully confused.{color}
> {color:#b94a48}Cube have several segments:{color}
> {color:#b94a48}Starttime-endtime{color}
> {color:#b94a48}20180101-20180225{color}
> 20180225-20180304
>  
> Attached the log and cube JSON.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to