[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-04-01 Thread Vineet Garg (JIRA)


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

Vineet Garg commented on CALCITE-2954:
--

Logged CALCITE-2971 to track the issue with correlated subquery in JOIN.

> SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set 
> instead of set of correlation id
> --
>
> Key: CALCITE-2954
> URL: https://issues.apache.org/jira/browse/CALCITE-2954
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>Priority: Major
>  Labels: pull-request-available, sub-query
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Call to {{apply}} takes set of {{CorrelationId}} but both 
> {{SubQueryJoinRemoveRule}} and {{SubQueryProjectRemoveRule}} are passing 
> empty set for whatever reason.
> I believe the correct thing to do here is to pass on the actual set of 
> {{CorrelationId}} like {{SubQueryFilterRemoveRule}}
> Ref:
> {code:java}
> final RexNode target = apply(e, ImmutableSet.of(),
> logic, builder, 2, fieldCount);
> {code}



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


[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-31 Thread Haisheng Yuan (JIRA)


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

Haisheng Yuan commented on CALCITE-2954:


OK

> SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set 
> instead of set of correlation id
> --
>
> Key: CALCITE-2954
> URL: https://issues.apache.org/jira/browse/CALCITE-2954
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>Priority: Major
>  Labels: pull-request-available, sub-query
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Call to {{apply}} takes set of {{CorrelationId}} but both 
> {{SubQueryJoinRemoveRule}} and {{SubQueryProjectRemoveRule}} are passing 
> empty set for whatever reason.
> I believe the correct thing to do here is to pass on the actual set of 
> {{CorrelationId}} like {{SubQueryFilterRemoveRule}}
> Ref:
> {code:java}
> final RexNode target = apply(e, ImmutableSet.of(),
> logic, builder, 2, fieldCount);
> {code}



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


[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-31 Thread Vineet Garg (JIRA)


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

Vineet Garg commented on CALCITE-2954:
--

[~hyuan] This test case fails even with the patch. I'll open a separate Jira 
for this

> SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set 
> instead of set of correlation id
> --
>
> Key: CALCITE-2954
> URL: https://issues.apache.org/jira/browse/CALCITE-2954
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>Priority: Major
>  Labels: pull-request-available, sub-query
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Call to {{apply}} takes set of {{CorrelationId}} but both 
> {{SubQueryJoinRemoveRule}} and {{SubQueryProjectRemoveRule}} are passing 
> empty set for whatever reason.
> I believe the correct thing to do here is to pass on the actual set of 
> {{CorrelationId}} like {{SubQueryFilterRemoveRule}}
> Ref:
> {code:java}
> final RexNode target = apply(e, ImmutableSet.of(),
> logic, builder, 2, fieldCount);
> {code}



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


[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-30 Thread Haisheng Yuan (JIRA)


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

Haisheng Yuan commented on CALCITE-2954:


[~vgarg] Can you add this query to the test case? This will match 
{{SubQueryJoinRemoveRule}}.

{code:java}
"select empno\n"
+ "from sales.emp as r left join sales.dept as s\n"
+ "on exists (select deptno from sales.emp where empno = s.deptno+20)";
{code}


> SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set 
> instead of set of correlation id
> --
>
> Key: CALCITE-2954
> URL: https://issues.apache.org/jira/browse/CALCITE-2954
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>Priority: Major
>  Labels: pull-request-available, sub-query
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Call to {{apply}} takes set of {{CorrelationId}} but both 
> {{SubQueryJoinRemoveRule}} and {{SubQueryProjectRemoveRule}} are passing 
> empty set for whatever reason.
> I believe the correct thing to do here is to pass on the actual set of 
> {{CorrelationId}} like {{SubQueryFilterRemoveRule}}
> Ref:
> {code:java}
> final RexNode target = apply(e, ImmutableSet.of(),
> logic, builder, 2, fieldCount);
> {code}



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


[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-29 Thread Haisheng Yuan (JIRA)


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

Haisheng Yuan commented on CALCITE-2954:


Do you have case for {{SubQueryJoinRemoveRule}}? I can't figure out the query 
matching this rule.

> SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set 
> instead of set of correlation id
> --
>
> Key: CALCITE-2954
> URL: https://issues.apache.org/jira/browse/CALCITE-2954
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>Priority: Major
>  Labels: pull-request-available, sub-query
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Call to {{apply}} takes set of {{CorrelationId}} but both 
> {{SubQueryJoinRemoveRule}} and {{SubQueryProjectRemoveRule}} are passing 
> empty set for whatever reason.
> I believe the correct thing to do here is to pass on the actual set of 
> {{CorrelationId}} like {{SubQueryFilterRemoveRule}}
> Ref:
> {code:java}
> final RexNode target = apply(e, ImmutableSet.of(),
> logic, builder, 2, fieldCount);
> {code}



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


[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-29 Thread Vineet Garg (JIRA)


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

Vineet Garg commented on CALCITE-2954:
--

Thanks for providing the feedback [~hyuan]. I have updated the pull request to 
add the test case.

> SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set 
> instead of set of correlation id
> --
>
> Key: CALCITE-2954
> URL: https://issues.apache.org/jira/browse/CALCITE-2954
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>Priority: Major
>  Labels: pull-request-available, sub-query
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Call to {{apply}} takes set of {{CorrelationId}} but both 
> {{SubQueryJoinRemoveRule}} and {{SubQueryProjectRemoveRule}} are passing 
> empty set for whatever reason.
> I believe the correct thing to do here is to pass on the actual set of 
> {{CorrelationId}} like {{SubQueryFilterRemoveRule}}
> Ref:
> {code:java}
> final RexNode target = apply(e, ImmutableSet.of(),
> logic, builder, 2, fieldCount);
> {code}



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


[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-29 Thread Haisheng Yuan (JIRA)


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

Haisheng Yuan commented on CALCITE-2954:


The code change looks good to me. Can you add tests in RelOptRulesTest.java?
This query does throw an exception without your change:

{code:java}
select sal, empno NOT IN (select deptno from dept where emp.job = dept.name) 
from emp;
{code}


> SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set 
> instead of set of correlation id
> --
>
> Key: CALCITE-2954
> URL: https://issues.apache.org/jira/browse/CALCITE-2954
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>Priority: Major
>  Labels: pull-request-available, sub-query
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Call to {{apply}} takes set of {{CorrelationId}} but both 
> {{SubQueryJoinRemoveRule}} and {{SubQueryProjectRemoveRule}} are passing 
> empty set for whatever reason.
> I believe the correct thing to do here is to pass on the actual set of 
> {{CorrelationId}} like {{SubQueryFilterRemoveRule}}
> Ref:
> {code:java}
> final RexNode target = apply(e, ImmutableSet.of(),
> logic, builder, 2, fieldCount);
> {code}



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


[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-27 Thread Haisheng Yuan (JIRA)


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

Haisheng Yuan commented on CALCITE-2954:


Will take a look.

> SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set 
> instead of set of correlation id
> --
>
> Key: CALCITE-2954
> URL: https://issues.apache.org/jira/browse/CALCITE-2954
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>Priority: Major
>  Labels: pull-request-available, sub-query
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Call to {{apply}} takes set of {{CorrelationId}} but both 
> {{SubQueryJoinRemoveRule}} and {{SubQueryProjectRemoveRule}} are passing 
> empty set for whatever reason.
> I believe the correct thing to do here is to pass on the actual set of 
> {{CorrelationId}} like {{SubQueryFilterRemoveRule}}
> Ref:
> {code:java}
> final RexNode target = apply(e, ImmutableSet.of(),
> logic, builder, 2, fieldCount);
> {code}



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


[jira] [Commented] (CALCITE-2954) SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set instead of set of correlation id

2019-03-27 Thread Vineet Garg (JIRA)


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

Vineet Garg commented on CALCITE-2954:
--

[~hyuan] Would you mind taking a look at the PR?

> SubQueryJoinRemoveRule and SubQueryProjectRemoveRule passing on empty set 
> instead of set of correlation id
> --
>
> Key: CALCITE-2954
> URL: https://issues.apache.org/jira/browse/CALCITE-2954
> Project: Calcite
>  Issue Type: Bug
>  Components: core
>Reporter: Vineet Garg
>Assignee: Vineet Garg
>Priority: Major
>  Labels: pull-request-available, sub-query
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Call to {{apply}} takes set of {{CorrelationId}} but both 
> {{SubQueryJoinRemoveRule}} and {{SubQueryProjectRemoveRule}} are passing 
> empty set for whatever reason.
> I believe the correct thing to do here is to pass on the actual set of 
> {{CorrelationId}} like {{SubQueryFilterRemoveRule}}
> Ref:
> {code:java}
> final RexNode target = apply(e, ImmutableSet.of(),
> logic, builder, 2, fieldCount);
> {code}



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