You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "XiaoXiang Yu (JIRA)" <ji...@apache.org> on 2018/11/01 07:02:01 UTC

[jira] [Commented] (KYLIN-3660) subquery, join wiht two cube return No Result

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

XiaoXiang Yu commented on KYLIN-3660:
-------------------------------------

Does t1 and t2 are both fact tables?

The SQL queries need be matched with the pre-defined OLAP model. It should be one fact table in a sql query.

> subquery, join wiht two cube return No Result
> ---------------------------------------------
>
>                 Key: KYLIN-3660
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3660
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: v2.5.0
>            Reporter: jiahua.hu
>            Priority: Major
>
> I have two cubes corresponding to two tables t1 and t2. When I pass the user_Id in t2 to limit the query range of the t1 table, I return an empty result. Then there is data in my t2 table.
> 我有两个cube分别对应两张表t1和t2。当我通过t2中的user_Id去限制t1表的查询范围时,返回空结果。然后我的t2表里是有数据的。
> select * from  t1 inner join  (select user_id from t2 where EXID='50') t2 on t1.user_id = t2.user_id; 
> select * from  t1 where user_id in (select user_id from t2 where EXID='50');
> select * from  t1 where user_id in (select '1002001');
> The above three statements execution results are returned No Result.
>  
> But the following statement execution can return results
> select * from  t1 where user_id in ('1002001');
>  
> =======================================================
> Query Id: 4a12730c-5222-b4a9-43fc-282e6bea7b51
> SQL: select * from t1 inner join (select user_id from t2 where EXID='50') t2 on t1.user_id = t2.user_id; 
> User: ADMIN
> Success: true
> Duration: 0.001
> Project: test_project
> Realization Names: [CUBE[name=t1_CUBE], CUBE[name=t2_CUBE]]
> Cuboid Ids: [3, 63]
> Total scan count: 50123
> Total scan bytes: 5412669
> Result row count: 0
> Accept Partial: true
> Is Partial Result: false
> Hit Exception Cache: false
> Storage cache used: true
> Is Query Push-Down: false
> Is Prepare: false
> Trace URL: null
> Message: null
> ============================================================
>  



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