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 2019/04/16 10:02:27 UTC

[GitHub] [calcite] vvysotskyi commented on a change in pull request #552: [CALCITE-2018] Queries failed with AssertionError: rel has lower cost…

vvysotskyi commented on a change in pull request #552: [CALCITE-2018] Queries failed with AssertionError: rel has lower cost…
URL: https://github.com/apache/calcite/pull/552#discussion_r275722923
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/volcano/RelSet.java
 ##########
 @@ -335,6 +340,18 @@ void mergeWith(
     // Has another set merged with this?
     assert equivalentSet == null;
 
+    // calls propagateCostImprovements() for RelSubset instances,
+    // whose best should be changed to checks whether that
+    // subset's parents have gotten cheaper.
+    final Set<RelSubset> activeSet = new HashSet<>();
+    for (Map.Entry<RelSubset, RelNode> subsetBestPair : changedSubsets.entrySet()) {
+      RelSubset relSubset = subsetBestPair.getKey();
+      relSubset.propagateCostImprovements(
+          planner, mq, subsetBestPair.getValue(),
+          activeSet);
 
 Review comment:
   Agree, this is one of the key changes in this PR.

----------------------------------------------------------------
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