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

Vsevolod Ostapenko commented on KYLIN-3628:
-------------------------------------------

Hi XiaoXiang, thank you for a quick turnaround with a fix.
I looked at the code change, and the following check seems too restrictive: 
{code:java}
if (dimensionDesc.isDerived() && 
dimensionDesc.getTable().equalsIgnoreCase(lookupTbl)) {
{code}
Per my internal tests, the entire lookup table is being snapshotted as part of 
a cube, if any dimension (non-derived or otherwise) is supplied by that table. 
So, dimension doesn't have to be derived.
In fact, in my test cubes there is no derived dimensions at all (all "derived" 
properties for all the lookup tables are set to null), it does not prevent 
executing "select * from lookupTable" against such cube on a non-patched 2.6.2 
system.

To summarize, I believe that the "dimensionDesc.isDerived()" call should be 
removed from the expression above.

> Query with lookup table always use latest snapshot
> --------------------------------------------------
>
>                 Key: KYLIN-3628
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3628
>             Project: Kylin
>          Issue Type: Improvement
>            Reporter: Na Zhai
>            Assignee: Na Zhai
>            Priority: Major
>             Fix For: v2.6.0
>
>
> If user queries a lookup table, Kylin will randomly selects a Cube (which has 
> the snapshot of this lookup table) to answer it. This causes uncertainty when 
> there are multiple cubes (share the same lookup): some cubes are newly built, 
> some not. If Kylin picks an old cube, the query result is old.
> To remove this uncertainty, for such queries, either always use latest 
> snapshot, or use earlist snapshot. We believe the "latest" version is better.



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

Reply via email to