zhimin wu created KYLIN-5025: -------------------------------- Summary: when filter is a derived column equals another column query failed Key: KYLIN-5025 URL: https://issues.apache.org/jira/browse/KYLIN-5025 Project: Kylin Issue Type: Bug Components: Query Engine Reporter: zhimin wu Assignee: zhimin wu Attachments: image-2021-07-02-21-41-15-854.png
Just use the following SQL query to learn_kylin. {quote}SELECT count(*) FROM KYLIN_SALES as KYLIN_SALES INNER JOIN KYLIN_CAL_DT as KYLIN_CAL_DT ON KYLIN_SALES.PART_DT = KYLIN_CAL_DT.CAL_DT WHERE KYLIN_SALES.PART_DT = KYLIN_CAL_DT.MONTH_BEG_DT {quote} that was OK, but if you put the derived column to the left of the filter like the following SQL, query failed. {quote}SELECT count(*) FROM KYLIN_SALES as KYLIN_SALES INNER JOIN KYLIN_CAL_DT as KYLIN_CAL_DT ON KYLIN_SALES.PART_DT = KYLIN_CAL_DT.CAL_DT WHERE KYLIN_CAL_DT.MONTH_BEG_DT = KYLIN_SALES.PART_DT {quote} {{!image-2021-07-02-21-41-15-854.png|width=618,height=271!}} -- This message was sent by Atlassian Jira (v8.3.4#803005)