[jira] [Commented] (CALCITE-2621) New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate)
[ https://issues.apache.org/jira/browse/CALCITE-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16647672#comment-16647672 ] Ruben Quesada Lopez commented on CALCITE-2621: -- Modification pushed, test also included > New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate) > > > Key: CALCITE-2621 > URL: https://issues.apache.org/jira/browse/CALCITE-2621 > Project: Calcite > Issue Type: Improvement >Reporter: Ruben Quesada Lopez >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > Similarly to JoinToCorrelateRule, in some contexts it might be interesting to > transform a SemiJoin into a LogicalCorrelate, for this purpose a > SemiJoinToCorrelateRule will be needed. > This feature requires the fix CALCITE-2605, otherwise we would get an > exception in EnumerableCorrelate#implement when trying to generate the > Expression selector: > {code} > Caused by: java.lang.IllegalStateException: Unable to convert SEMI to > JoinRelType > at org.apache.calcite.sql.SemiJoinType.toJoinType(SemiJoinType.java:83) > at > org.apache.calcite.adapter.enumerable.EnumerableCorrelate.implement(EnumerableCorrelate.java:103) > ... > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2621) New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate)
[ https://issues.apache.org/jira/browse/CALCITE-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16647551#comment-16647551 ] Ruben Quesada Lopez commented on CALCITE-2621: -- Ok, I can remove the function and extract the SemiJoin type for the LogicalCorrelate programatically: {code} RelNode newRel = LogicalCorrelate.create(left, relBuilder.build(), correlationId, requiredColumns.build(), join instanceof SemiJoin ? SemiJoinType.SEMI : SemiJoinType.of(join.getJoinType())); {code} > New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate) > > > Key: CALCITE-2621 > URL: https://issues.apache.org/jira/browse/CALCITE-2621 > Project: Calcite > Issue Type: Improvement >Reporter: Ruben Quesada Lopez >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > Similarly to JoinToCorrelateRule, in some contexts it might be interesting to > transform a SemiJoin into a LogicalCorrelate, for this purpose a > SemiJoinToCorrelateRule will be needed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2621) New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate)
[ https://issues.apache.org/jira/browse/CALCITE-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16647084#comment-16647084 ] Julian Hyde commented on CALCITE-2621: -- I'm not a fan of making things configurable unless there is a reasonable chance that someone will want to do something other than the default. In my opinion every configuration parameter is a design failure. Good products have fewer configuration parameters than bad ones, but more capabilities. > New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate) > > > Key: CALCITE-2621 > URL: https://issues.apache.org/jira/browse/CALCITE-2621 > Project: Calcite > Issue Type: Improvement >Reporter: Ruben Quesada Lopez >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > Similarly to JoinToCorrelateRule, in some contexts it might be interesting to > transform a SemiJoin into a LogicalCorrelate, for this purpose a > SemiJoinToCorrelateRule will be needed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2621) New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate)
[ https://issues.apache.org/jira/browse/CALCITE-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16646705#comment-16646705 ] Ruben Quesada Lopez commented on CALCITE-2621: -- I'll work on some unit tests. The idea behind the function is to make configurable the SemiJoinType of the generated LogicalCorrelate. In the original JoinToCorrelateRule it was {{SemiJoinType.of(join.getJoinType())}}, but in the new SemiJoinToCorrelateRule it will be simply {{SemiJoinType.SEMI}}. Maybe there is a simpler way to extract this information from the Join instance that I'm not aware of... > New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate) > > > Key: CALCITE-2621 > URL: https://issues.apache.org/jira/browse/CALCITE-2621 > Project: Calcite > Issue Type: Improvement >Reporter: Ruben Quesada Lopez >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > Similarly to JoinToCorrelateRule, in some contexts it might be interesting to > transform a SemiJoin into a LogicalCorrelate, for this purpose a > SemiJoinToCorrelateRule will be needed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2621) New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate)
[ https://issues.apache.org/jira/browse/CALCITE-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16646484#comment-16646484 ] Julian Hyde commented on CALCITE-2621: -- Can you add some tests? Why do you need a function to derive SemiJoinType? > New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate) > > > Key: CALCITE-2621 > URL: https://issues.apache.org/jira/browse/CALCITE-2621 > Project: Calcite > Issue Type: Improvement >Reporter: Ruben Quesada Lopez >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > Similarly to JoinToCorrelateRule, in some contexts it might be interesting to > transform a SemiJoin into a LogicalCorrelate, for this purpose a > SemiJoinToCorrelateRule will be needed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (CALCITE-2621) New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate)
[ https://issues.apache.org/jira/browse/CALCITE-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16646354#comment-16646354 ] Ruben Quesada Lopez commented on CALCITE-2621: -- A possible way to implement this could be generalizing JoinToCorrelateRule with a parameterized constructor to support any sub-class of org.apache.calcite.rel.core.Join, and not just org.apache.calcite.rel.logical.LogicalJoin. Then, the new SemiJoinToCorrelateRule could use this feature. > New rule: SemiJoinToCorrelateRule (SemiJoin => LogicalCorrelate) > > > Key: CALCITE-2621 > URL: https://issues.apache.org/jira/browse/CALCITE-2621 > Project: Calcite > Issue Type: Improvement >Reporter: Ruben Quesada Lopez >Assignee: Julian Hyde >Priority: Major > Fix For: 1.18.0 > > > Similarly to JoinToCorrelateRule, in some contexts it might be interesting to > transform a SemiJoin into a LogicalCorrelate, for this purpose a > SemiJoinToCorrelateRule will be needed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)