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

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

Commit be22ca0de7e512df5dc443b99ed6df63635f9dfe in kylin's branch 
refs/heads/kylin5 from Pengfei Zhan
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=be22ca0de7 ]

KYLIN-5839 Block agg-push-down for non-equal-join

KYLIN-5382 only deals with the equal-join conditions and gives the
corresponding test cases.
KYLIN-5831 fixed the problem where non-equiv-join conditions were
incorrectly converted to equivalent conditions. Due to the lack of test
cases, a regression bug occurs in ContextUtil.isJoinFromSameContext.

The related non-equiv-join sql is as follows.
If you want a corresponding equal-join sql, just remove the condition
content `or (t2.fcol_10 is null and t5.fcol_17 is null)`.

```sql
select t2.fcol_7 fcol_7, count(distinct t2.fcol_6) fcol_6
from (select t1.company_code fcol_6, t1.type_name fcol_7,
          case when t1.created_date = t0.fcol_1 then 'TRUE'
          else 'FALSE' end fcol_10
      from ( select company_code, created_date, type_name
            from "DEFAULT"."TEST_AGG_PUSH_DOWN" ) t1
            join ( select company_code, max(created_date) fcol_1
                   from "DEFAULT"."TEST_AGG_PUSH_DOWN"
                   group by company_code
            ) t0 on t1.company_code = t0.company_code
    ) t2 join ( select 'TRUE' fcol_17 ) t5
    on  t2.fcol_10 = t5.fcol_17 or (t2.fcol_10 is null and t5.fcol_17 is null)
group by t2.fcol_7
```


> Query hit index result is incorrect
> -----------------------------------
>
>                 Key: KYLIN-5382
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5382
>             Project: Kylin
>          Issue Type: Bug
>          Components: Query Engine
>    Affects Versions: 5.0-alpha
>            Reporter: leejaywei
>            Assignee: leejaywei
>            Priority: Major
>             Fix For: 5.0-alpha
>
>
> 查询命中索引返回结果不正确
> 单个子查询返回都有结果,但是进行join后就没有结果,同样的查询下压查询有结果



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

Reply via email to