Yuming Wang created IMPALA-10634:
------------------------------------

             Summary: Removes outer join if it only has DISTINCT on streamed 
side
                 Key: IMPALA-10634
                 URL: https://issues.apache.org/jira/browse/IMPALA-10634
             Project: IMPALA
          Issue Type: Improvement
          Components: Backend
            Reporter: Yuming Wang


Removes outer join if it only has DISTINCT on streamed side:
{code:sql}
CREATE TABLE t1(a int, b int);
CREATE TABLE t2(a int, b int);
SELECT DISTINCT t1.b FROM t1 LEFT JOIN t2 ON t1.a = t2.a;
{code}

We can rewrite {{SELECT DISTINCT b FROM t1 LEFT JOIN t2 ON t1.a = t2.a}} to 
{{SELECT DISTINCT t1.b FROM t1}}.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to