[jira] [Commented] (CALCITE-2968) New AntiJoin relational expression

2019-06-07 Thread Michael Mior (JIRA)


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

Michael Mior commented on CALCITE-2968:
---

Fixed in 
[be2b979|https://github.com/apache/calcite/commit/be2b97905548a5b24067c8636567b364529332cc]

> New AntiJoin relational expression
> --
>
> Key: CALCITE-2968
> URL: https://issues.apache.org/jira/browse/CALCITE-2968
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Ruben Quesada Lopez
>Assignee: Ruben Quesada Lopez
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.20.0
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> The goal of this ticket is to follow the discussion started in CALCITE-2920 
> (and its [PR|https://github.com/apache/calcite/pull/1110]).
> With the implementation of CALCITE-2920, RelBuilder has now a method to 
> create an AntiJoin. However, since, for the moment, there is no "AntiJoin" 
> expression, the only possibility to build an AntiJoin is using a 
> LogicalCorrelate with SemiJoinType.ANTI, and that's exactly what this method 
> does, for now.
> The idea would be to "generalize" this with the creation of a new AntiJoin 
> (a.k.a. AntiSemiJoin) relational expression. With the implementation of  
> CALCITE-2969 (re-design of join-like expressions), it seems clear that the 
> new AntiJoin expression will be a *LogicalJoin with JoinType=ANTI*. Also, it 
> will have to be verified that:
> - this new AntiJoin works fine in EnumerableConvention with all types of join 
> condition (equi-join, partial equi-join, non equi-join)
> - this new AntiJoin can be correctly transformed into a Correlate (type ANTI) 
> via JoinToCorrelateRule



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


[jira] [Commented] (CALCITE-2968) New AntiJoin relational expression

2019-06-05 Thread Danny Chan (JIRA)


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

Danny Chan commented on CALCITE-2968:
-

[~rubenql] I have also reviewed this PR and +1 for merging this into 1.20.0, 
thanks for your great work !

> New AntiJoin relational expression
> --
>
> Key: CALCITE-2968
> URL: https://issues.apache.org/jira/browse/CALCITE-2968
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Ruben Quesada Lopez
>Assignee: Ruben Quesada Lopez
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.20.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The goal of this ticket is to follow the discussion started in CALCITE-2920 
> (and its [PR|https://github.com/apache/calcite/pull/1110]).
> With the implementation of CALCITE-2920, RelBuilder has now a method to 
> create an AntiJoin. However, since, for the moment, there is no "AntiJoin" 
> expression, the only possibility to build an AntiJoin is using a 
> LogicalCorrelate with SemiJoinType.ANTI, and that's exactly what this method 
> does, for now.
> The idea would be to "generalize" this with the creation of a new AntiJoin 
> (a.k.a. AntiSemiJoin) relational expression. With the implementation of  
> CALCITE-2969 (re-design of join-like expressions), it seems clear that the 
> new AntiJoin expression will be a *LogicalJoin with JoinType=ANTI*. Also, it 
> will have to be verified that:
> - this new AntiJoin works fine in EnumerableConvention with all types of join 
> condition (equi-join, partial equi-join, non equi-join)
> - this new AntiJoin can be correctly transformed into a Correlate (type ANTI) 
> via JoinToCorrelateRule



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


[jira] [Commented] (CALCITE-2968) New AntiJoin relational expression

2019-06-04 Thread Michael Mior (JIRA)


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

Michael Mior commented on CALCITE-2968:
---

[~julianhyde] If you think it's ready to go, that's good enough for me. Making 
it into 1.20.0 sounds fine.

> New AntiJoin relational expression
> --
>
> Key: CALCITE-2968
> URL: https://issues.apache.org/jira/browse/CALCITE-2968
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Ruben Quesada Lopez
>Assignee: Ruben Quesada Lopez
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The goal of this ticket is to follow the discussion started in CALCITE-2920 
> (and its [PR|https://github.com/apache/calcite/pull/1110]).
> With the implementation of CALCITE-2920, RelBuilder has now a method to 
> create an AntiJoin. However, since, for the moment, there is no "AntiJoin" 
> expression, the only possibility to build an AntiJoin is using a 
> LogicalCorrelate with SemiJoinType.ANTI, and that's exactly what this method 
> does, for now.
> The idea would be to "generalize" this with the creation of a new AntiJoin 
> (a.k.a. AntiSemiJoin) relational expression. With the implementation of  
> CALCITE-2969 (re-design of join-like expressions), it seems clear that the 
> new AntiJoin expression will be a *LogicalJoin with JoinType=ANTI*. Also, it 
> will have to be verified that:
> - this new AntiJoin works fine in EnumerableConvention with all types of join 
> condition (equi-join, partial equi-join, non equi-join)
> - this new AntiJoin can be correctly transformed into a Correlate (type ANTI) 
> via JoinToCorrelateRule



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


[jira] [Commented] (CALCITE-2968) New AntiJoin relational expression

2019-06-04 Thread Ruben Quesada Lopez (JIRA)


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

Ruben Quesada Lopez commented on CALCITE-2968:
--

[~julianhyde], work is done, and it is ready to be merged (after rebase & 
review). 
I personally think it could go into 1.20, but since this is not urgent, I have 
no issue to postpone it until next version if we consider than 1.20 scope is 
closed.

> New AntiJoin relational expression
> --
>
> Key: CALCITE-2968
> URL: https://issues.apache.org/jira/browse/CALCITE-2968
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Ruben Quesada Lopez
>Assignee: Ruben Quesada Lopez
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The goal of this ticket is to follow the discussion started in CALCITE-2920 
> (and its [PR|https://github.com/apache/calcite/pull/1110]).
> With the implementation of CALCITE-2920, RelBuilder has now a method to 
> create an AntiJoin. However, since, for the moment, there is no "AntiJoin" 
> expression, the only possibility to build an AntiJoin is using a 
> LogicalCorrelate with SemiJoinType.ANTI, and that's exactly what this method 
> does, for now.
> The idea would be to "generalize" this with the creation of a new AntiJoin 
> (a.k.a. AntiSemiJoin) relational expression. With the implementation of  
> CALCITE-2969 (re-design of join-like expressions), it seems clear that the 
> new AntiJoin expression will be a *LogicalJoin with JoinType=ANTI*. Also, it 
> will have to be verified that:
> - this new AntiJoin works fine in EnumerableConvention with all types of join 
> condition (equi-join, partial equi-join, non equi-join)
> - this new AntiJoin can be correctly transformed into a Correlate (type ANTI) 
> via JoinToCorrelateRule



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


[jira] [Commented] (CALCITE-2968) New AntiJoin relational expression

2019-06-04 Thread Julian Hyde (JIRA)


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

Julian Hyde commented on CALCITE-2968:
--

I reviewed the PR. It looks to be in really good shape. Is it ready to merge? 
Could it go into 1.20? (That’s also a question for [~michaelmior], as release 
manager for 1.20.)

> New AntiJoin relational expression
> --
>
> Key: CALCITE-2968
> URL: https://issues.apache.org/jira/browse/CALCITE-2968
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Ruben Quesada Lopez
>Assignee: Ruben Quesada Lopez
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The goal of this ticket is to follow the discussion started in CALCITE-2920 
> (and its [PR|https://github.com/apache/calcite/pull/1110]).
> With the implementation of CALCITE-2920, RelBuilder has now a method to 
> create an AntiJoin. However, since, for the moment, there is no "AntiJoin" 
> expression, the only possibility to build an AntiJoin is using a 
> LogicalCorrelate with SemiJoinType.ANTI, and that's exactly what this method 
> does, for now.
> The idea would be to "generalize" this with the creation of a new AntiJoin 
> (a.k.a. AntiSemiJoin) relational expression. With the implementation of  
> CALCITE-2969 (re-design of join-like expressions), it seems clear that the 
> new AntiJoin expression will be a *LogicalJoin with JoinType=ANTI*. Also, it 
> will have to be verified that:
> - this new AntiJoin works fine in EnumerableConvention with all types of join 
> condition (equi-join, partial equi-join, non equi-join)
> - this new AntiJoin can be correctly transformed into a Correlate (type ANTI) 
> via JoinToCorrelateRule



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


[jira] [Commented] (CALCITE-2968) New AntiJoin relational expression

2019-06-04 Thread Ruben Quesada Lopez (JIRA)


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

Ruben Quesada Lopez commented on CALCITE-2968:
--

CALCITE-2969 is completed. I have adapted the description on the current ticket 
accordingly.
Work in progress [here|https://github.com/apache/calcite/pull/1246]

> New AntiJoin relational expression
> --
>
> Key: CALCITE-2968
> URL: https://issues.apache.org/jira/browse/CALCITE-2968
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Ruben Quesada Lopez
>Assignee: Ruben Quesada Lopez
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The goal of this ticket is to follow the discussion started in CALCITE-2920 
> (and its [PR|https://github.com/apache/calcite/pull/1110]).
> With the implementation of CALCITE-2920, RelBuilder has now a method to 
> create an AntiJoin. However, since, for the moment, there is no "AntiJoin" 
> expression, the only possibility to build an AntiJoin is using a 
> LogicalCorrelate with SemiJoinType.ANTI, and that's exactly what this method 
> does, for now.
> The idea would be to "generalize" this with the creation of a new AntiJoin 
> (a.k.a. AntiSemiJoin) relational expression. With the implementation of  
> CALCITE-2969 (re-design of join-like expressions), it seems clear that the 
> new AntiJoin expression will be a *LogicalJoin with JoinType=ANTI*. Also, it 
> will have to be verified that:
> - this new AntiJoin works fine in EnumerableConvention with all types of join 
> condition (equi-join, partial equi-join, non equi-join)
> - this new AntiJoin can be correctly transformed into a Correlate (type ANTI) 
> via JoinToCorrelateRule



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


[jira] [Commented] (CALCITE-2968) New AntiJoin relational expression

2019-04-01 Thread Ruben Quesada Lopez (JIRA)


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

Ruben Quesada Lopez commented on CALCITE-2968:
--

Ok, let us wait until the Join, SemiJoin, Correlate refactoring gets done, and 
then move on with the implementation of AntiJoin based on the new design

> New AntiJoin relational expression
> --
>
> Key: CALCITE-2968
> URL: https://issues.apache.org/jira/browse/CALCITE-2968
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Ruben Quesada Lopez
>Priority: Major
>
> The goal of this ticket is to follow the discussion started in CALCITE-2920 
> (and its [PR|https://github.com/apache/calcite/pull/1110]).
> With the implementation of CALCITE-2920, RelBuilder has now a method to 
> create an AntiJoin. However, since, for the moment, there is no "AntiJoin" 
> expression, the only possibility to build an AntiJoin is using a 
> LogicalCorrelate with SemiJoinType.ANTI, and that's exactly what this method 
> does, for now.
> The idea would be to "generalize" this with the creation of a new AntiJoin 
> (a.k.a. AntiSemiJoin) relational expression.
> Some ideas about how to implement it:
> - Modify SemiJoin class: add a new instance field protected final 
> SemiJoinType semiJoinType;, which will be by default SemiJoinType.SEMI (to 
> ensure backwards compatibility); but that could also be SemiJoinType.ANTI, to 
> represent an AntiJoin (a.k.a. AntiSemiJoin)
> - We could easily have two implementations of Antijoin:
> -- a) Enumerable: small modification in EnumerableSemiJoin and 
> EnumerableSemiJoinRule in order to propagate the SemiJoinType, plus a new 
> antiJoin method in EnumerableDefaults (basically the same as semiJoin method, 
> but with a "not contains" predicate instead of "contains")
> -- b) Correlate: small modification in JoinToCorrelateRule to propagate the 
> SemiJoin.semiJoinType will suffice to create the appropriate LogicalCorrelate 
> with type SEMI / ANTI
> - RelBuilder antiJoin method would no longer create a LogicalCorrelate 
> type=ANTI, but instead a SemiJoin type=ANTI (using a new method in 
> SemiJoinFactory that would accept an additional SemiJoinType parameter).



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


[jira] [Commented] (CALCITE-2968) New AntiJoin relational expression

2019-04-01 Thread Stamatis Zampetakis (JIRA)


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

Stamatis Zampetakis commented on CALCITE-2968:
--

There has been a discussion on this subject in the dev list. See thread [Join, 
SemiJoin, 
Correlate|https://mail-archives.apache.org/mod_mbox/calcite-dev/201903.mbox/%3C8EEA04A0-4A77-4283-BD20-B019E19AE126%40apache.org%3E]
 which seems to have reached consensus. I think the discussion there supersedes 
the current proposal so I would prefer to go towards that direction.

> New AntiJoin relational expression
> --
>
> Key: CALCITE-2968
> URL: https://issues.apache.org/jira/browse/CALCITE-2968
> Project: Calcite
>  Issue Type: New Feature
>Reporter: Ruben Quesada Lopez
>Priority: Major
>
> The goal of this ticket is to follow the discussion started in CALCITE-2920 
> (and its [PR|https://github.com/apache/calcite/pull/1110]).
> With the implementation of CALCITE-2920, RelBuilder has now a method to 
> create an AntiJoin. However, since, for the moment, there is no "AntiJoin" 
> expression, the only possibility to build an AntiJoin is using a 
> LogicalCorrelate with SemiJoinType.ANTI, and that's exactly what this method 
> does, for now.
> The idea would be to "generalize" this with the creation of a new AntiJoin 
> (a.k.a. AntiSemiJoin) relational expression.
> Some ideas about how to implement it:
> - Modify SemiJoin class: add a new instance field protected final 
> SemiJoinType semiJoinType;, which will be by default SemiJoinType.SEMI (to 
> ensure backwards compatibility); but that could also be SemiJoinType.ANTI, to 
> represent an AntiJoin (a.k.a. AntiSemiJoin)
> - We could easily have two implementations of Antijoin:
> -- a) Enumerable: small modification in EnumerableSemiJoin and 
> EnumerableSemiJoinRule in order to propagate the SemiJoinType, plus a new 
> antiJoin method in EnumerableDefaults (basically the same as semiJoin method, 
> but with a "not contains" predicate instead of "contains")
> -- b) Correlate: small modification in JoinToCorrelateRule to propagate the 
> SemiJoin.semiJoinType will suffice to create the appropriate LogicalCorrelate 
> with type SEMI / ANTI
> - RelBuilder antiJoin method would no longer create a LogicalCorrelate 
> type=ANTI, but instead a SemiJoin type=ANTI (using a new method in 
> SemiJoinFactory that would accept an additional SemiJoinType parameter).



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