[
https://issues.apache.org/jira/browse/KYLIN-6044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17930136#comment-17930136
]
ASF GitHub Bot commented on KYLIN-6044:
---------------------------------------
lionelcao merged PR #2294:
URL: https://github.com/apache/kylin/pull/2294
> 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)