Ioana Delaney created SPARK-23755:
-------------------------------------

             Summary: [Performance] Distinct elimination
                 Key: SPARK-23755
                 URL: https://issues.apache.org/jira/browse/SPARK-23755
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: Ioana Delaney


The Distinct requirement can be removed if it is proved that the operation 
produces unique output.
 
{code}
select distinct d.deptno /* PK */, e.empname
from employee e, department d
where e.empno = d.mgrno /*PK = FK*/
{code}

*Internal query after rewrite:*

{code}
select d.deptno, e.empname
from employee e, department d
where e.empno = d.mgrno
{code}




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to