Zhimin Wu created KYLIN-5839: -------------------------------- Summary: Block agg-push-down for non-equal-join Key: KYLIN-5839 URL: https://issues.apache.org/jira/browse/KYLIN-5839 Project: Kylin Issue Type: Bug Components: Query Engine Affects Versions: 5.0-beta Reporter: Zhimin Wu Assignee: Zhimin Wu Fix For: 5.0.0
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)`. {code:java} 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{code} -- This message was sent by Atlassian Jira (v8.20.10#820010)