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/02/14 14:52:04 UTC

[GitHub] [calcite] danny0405 commented on a change in pull request #1801: [CALCITE-3791] HepPlanner does not clear metadata cache for the ancestors of discarded node when a transformation happens

danny0405 commented on a change in pull request #1801: [CALCITE-3791] HepPlanner does not clear metadata cache for the ancestors of discarded node when a transformation happens
URL: https://github.com/apache/calcite/pull/1801#discussion_r379471437
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/metadata/RelMdUtil.java
 ##########
 @@ -943,9 +943,9 @@ private static boolean isNonNegative(Double result, boolean fail) {
    * Removes cached metadata values for specified RelNode.
    *
    * @param rel RelNode whose cached metadata should be removed
+   * @return true if cache for the provided RelNode was not empty
    */
-  public static void clearCache(RelNode rel) {
-    rel.getCluster().getMetadataQuery().clearCache(rel);
+  public static boolean clearCache(RelNode rel) {
 
 Review comment:
   I'm wondering how to give a valid test, e.g. even though we clear the cache that should not do, the tests still passes.

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