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

ASF subversion and git services commented on KYLIN-6044:
--------------------------------------------------------

Commit a03fbf8e7eb1b438b921aec9eb92aed8b8ac4075 in kylin's branch 
refs/heads/kylin5 from Guoliang Sun
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=a03fbf8e7e ]

KYLIN-6044 Removed ProjectAggregateMergeRule to avoid aggregate index mismatches


> Subqueries containing JOIN may lead to incorrect query results
> --------------------------------------------------------------
>
>                 Key: KYLIN-6044
>                 URL: https://issues.apache.org/jira/browse/KYLIN-6044
>             Project: Kylin
>          Issue Type: Bug
>    Affects Versions: 5.0.0
>            Reporter: Guoliang Sun
>            Priority: Major
>
> It was discovered that a specific SQL query hits inconsistent indexes in a 
> particular version compared to earlier versions. Further simplification of 
> the SQL revealed that this issue might lead to incorrect query results.  
>  
> {code:java}
> SELECT count(1)
> FROM (
>     SELECT 1
>     FROM (
>         SELECT sum(D_YEAR) as acct_bal_CURR
>             ,1 AS DT
>         FROM SSB.DATES
>         ) a
>     left JOIN (
>         SELECT sum(D_YEARMONTHNUM) acct_id_CURR
>             ,1 AS DT
>         FROM SSB.DATES 
>         ) b ON a.DT = b.DT
>     )
> LIMIT 500{code}
> The model contains two SUM metrics from the SQL, and the correct query result 
> should be 1.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to