Julian Hyde commented on CALCITE-330:

Since we opted to create {{SemiJoin}} (see CALCITE-368), rather than create the 
{{eliminateRightDuplicates}} flag, this case will probably never be fixed.

> Add a rule that converts join-on-aggregate to semi-join
> -------------------------------------------------------
>                 Key: CALCITE-330
>                 URL: https://issues.apache.org/jira/browse/CALCITE-330
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
> Once CALCITE-328 is completed and {{Join}} has a flag 
> {{eliminateRightDuplicates}}, we need a rule to populate that flag from SQL 
> queries.
> Transformers that deal with 'IN subquery' (both correlated and uncorrelated) 
> should set this flag. (In particular check TPC-DS Q95.)
> Also queries written '... JOIN (SELECT DISTINCT ...)'.
> Also handle queries whose right input is known to be already unique, e.g.
> {code:sql}
> SELECT emp.name
> FROM emp JOIN dept USING (deptno)
> WHERE dept.location = 'San Francisco'
> {code}

This message was sent by Atlassian JIRA

Reply via email to