[ 
https://issues.apache.org/jira/browse/CALCITE-5201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17579076#comment-17579076
 ] 

Julian Hyde commented on CALCITE-5201:
--------------------------------------

Yes, the idea is to only mark it closed when the fix is in users' hands (via a 
release). Generally the release manager does a batch update right after the 
release, marking all 'resolved' issues in that release 'closed'.

It looks like CALCITE-330 should be closed with resolution 'won't fix', because 
we decided not to add the {{eliminateRightDuplicates}} to {{Join}}.

Is this bug fixed? In other words, is the query
{code:sql}
select * 
from emp
where exists(select * from dept where emp.deptno = dept.deptno and emp.empno = 
dept.deptno)
{code}
converted to a SemiJoin, is there a test for it, and which commit added that 
test?

> Improve SemiJoinRule to match Join's right input which is unique for Join keys
> ------------------------------------------------------------------------------
>
>                 Key: CALCITE-5201
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5201
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.30.0
>            Reporter: Benchao Li
>            Assignee: Benchao Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.32.0
>
>          Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> As disscussed inĀ CALCITE-5195, the following SQL cannot be transformed to 
> semi join:
> {code:sql}
> select * 
> from emp
> where exists(select * from dept where emp.deptno = dept.deptno and emp.empno 
> = dept.deptno)
> {code}
> Currently {{SemiJoinRule}} requires that right child must be an 
> {{Aggregate}}, however, sometimes it's not, e.g. in 
> [{{RelBuilder}}|https://github.com/apache/calcite/blob/300f5200fe50870da418366613df1cd09921b1b6/core/src/main/java/org/apache/calcite/tools/RelBuilder.java#L2241-L2247],
>  if the group keys are unique, then we'll remove the {{Aggregate}}.



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

Reply via email to