[jira] [Commented] (KYLIN-3285) "Value NNN not exists" error run executing query

2018-03-12 Thread Shaofeng SHI (JIRA)

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

Shaofeng SHI commented on KYLIN-3285:
-

This should be the same issue as KYLIN-3287

>  "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
> Fix For: v2.3.1
>
> 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)


[jira] [Commented] (KYLIN-3285) "Value NNN not exists" error run executing query

2018-03-10 Thread Shaofeng SHI (JIRA)

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

Shaofeng SHI commented on KYLIN-3285:
-

Another workround would be: use "date" encoding for the "day_time" column.

By default Kylin uses "Date" encoding for a column whose type is "Date" or 
"Timestamp". "Date" encoding will convert a "-MM-dd" value to a long value 
so it doesn't need a dictionary. In your case, as the col is in "string" type, 
and you selected "dict" for it, so Kylin doesn't know it is a date, then use a 
dictionary for that. 

>  "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)


[jira] [Commented] (KYLIN-3285) "Value NNN not exists" error run executing query

2018-03-10 Thread Shaofeng SHI (JIRA)

[ 
https://issues.apache.org/jira/browse/KYLIN-3285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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.(CubeScanRangePlanner.java:114)
at 
org.apache.kylin.storage.gtrecord.CubeSegmentScanner.(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)


[jira] [Commented] (KYLIN-3285) "Value NNN not exists" error run executing query

2018-03-09 Thread ZHAOXIXIN (JIRA)

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

ZHAOXIXIN commented on KYLIN-3285:
--

the problem maybe from the "shard by" setting, after I set the day_time "shard 
by” to true,the issue comes when I query.
If set all "shard by" to false, query can be done successfully.

>  "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)