You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "liyang (Jira)" <ji...@apache.org> on 2025/04/05 02:08:00 UTC

[jira] [Closed] (KYLIN-6044) Subqueries containing JOIN may lead to incorrect query results

     [ https://issues.apache.org/jira/browse/KYLIN-6044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

liyang closed KYLIN-6044.
-------------------------

close as kylin 5.0.2 released

> 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
>            Assignee: Guoliang Sun
>            Priority: Major
>             Fix For: 5.0.2
>
>
> 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)