You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/01/03 07:25:26 UTC

[GitHub] [calcite] hsyuan opened a new pull request #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive

hsyuan opened a new pull request #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive
URL: https://github.com/apache/calcite/pull/1719
 
 
   JIRA: https://issues.apache.org/jira/browse/CALCITE-3668
   
   The change was introduced by https://github.com/apache/calcite/pull/784, which I think is wrong.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] vlsi commented on issue #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive

Posted by GitBox <gi...@apache.org>.
vlsi commented on issue #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive
URL: https://github.com/apache/calcite/pull/1719#issuecomment-578317648
 
 
   @hsyuan , this looks good to me modulo `subset.getSubsets()`.
   
   I think it would be extremely confusing, especially for those who don't know how `RelSet` is different from `RelSubset`.
   
   Even though the method is not in public API, I would suggest picking a name that would convey the meaning.
   I don't know. `subset.getSiblingSubsetsWithMatchingTraits()`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] hsyuan commented on issue #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive

Posted by GitBox <gi...@apache.org>.
hsyuan commented on issue #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive
URL: https://github.com/apache/calcite/pull/1719#issuecomment-578335949
 
 
   Agree, the name is confusing. I don't think it will be used by any other places. How about we just drop the method, use this directly:
   ```
   successors = subset.set.subsets.stream()
           .filter(s -> s.getTraitSet().satisfies(subset.getTraitSet()))
           .collect(Collectors.toList());
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] hsyuan merged pull request #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive

Posted by GitBox <gi...@apache.org>.
hsyuan merged pull request #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive
URL: https://github.com/apache/calcite/pull/1719
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] vlsi commented on a change in pull request #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive

Posted by GitBox <gi...@apache.org>.
vlsi commented on a change in pull request #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive
URL: https://github.com/apache/calcite/pull/1719#discussion_r370858438
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/volcano/VolcanoRuleCall.java
 ##########
 @@ -317,8 +317,7 @@ private void matchRecurse(int solve) {
           final RelSubset subset =
               (RelSubset) inputs.get(operand.ordinalInParent);
           if (operand.getMatchedClass() == RelSubset.class) {
-            // If the rule wants the whole subset, we just provide it
-            successors = ImmutableList.of(subset);
+            successors = subset.getSubsets();
 
 Review comment:
   The naming is hard.
   `subset.getSubsets()` looks confusing :(

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] hsyuan commented on issue #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive

Posted by GitBox <gi...@apache.org>.
hsyuan commented on issue #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive
URL: https://github.com/apache/calcite/pull/1719#issuecomment-577917247
 
 
   @vlsi I have updated with a test case, please take a look.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] vlsi commented on issue #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive

Posted by GitBox <gi...@apache.org>.
vlsi commented on issue #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive
URL: https://github.com/apache/calcite/pull/1719#issuecomment-570506643
 
 
   @hsyuan , have you seen this discussion?
   https://github.com/apache/calcite/pull/784#discussion_r245797826
   
   Can you provide an explanation and/or a test case to elaborate on why the current implementation is not right?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] vlsi commented on issue #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive

Posted by GitBox <gi...@apache.org>.
vlsi commented on issue #1719: [CALCITE-3668] VolcanoPlanner does not match all the RelSubSet in matchRecursive
URL: https://github.com/apache/calcite/pull/1719#issuecomment-578979659
 
 
   LGTM, thanks

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services