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

xiong duan resolved CALCITE-5816.
---------------------------------
    Fix Version/s: 1.35.0
       Resolution: Fixed

> Query with LEFT SEMI JOIN should not refer to RHS columns
> ---------------------------------------------------------
>
>                 Key: CALCITE-5816
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5816
>             Project: Calcite
>          Issue Type: Bug
>          Components: babel, core
>    Affects Versions: 1.34.0
>            Reporter: hongyu guo
>            Assignee: hongyu guo
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.35.0
>
>
> A LEFT SEMI JOIN can only return columns from the left-hand table.
> But calcite also return both left-hand and right-hand table columns.
> In 
> [select.iq|https://github.com/apache/calcite/blob/c0f2e9b50e7e61fe732a07d04786d5df95aa557e/babel/src/test/resources/sql/select.iq]
> {code:sql}
> # LEFT SEMI JOIN (Hive only)
> SELECT *
> FROM emp LEFT SEMI JOIN dept ON emp.deptno = dept.deptno;
> SELECT "EMP"."EMPNO", "EMP"."ENAME", "EMP"."JOB", "EMP"."MGR", 
> "EMP"."HIREDATE", "EMP"."SAL", "EMP"."COMM", "EMP"."DEPTNO", "DEPT"."DEPTNO" 
> AS "DEPTNO0", "DEPT"."DNAME", "DEPT"."LOC"
> FROM "scott"."EMP" AS "EMP"
>     LEFT SEMI JOIN "scott"."DEPT" AS "DEPT" ON "EMP"."DEPTNO" = 
> "DEPT"."DEPTNO"
> !explain-validated-on hive
> {code}



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

Reply via email to