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/03/03 04:38:19 UTC

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

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

 ##########
 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:
   Okey, this is definitely needed.

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