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/03/10 08:53:04 UTC

[GitHub] [calcite] danny0405 commented on a change in pull request #1811: [CALCITE-3789] Support validation of UNNEST multiple array columns like Presto

danny0405 commented on a change in pull request #1811: [CALCITE-3789] Support validation of UNNEST multiple array columns like Presto
URL: https://github.com/apache/calcite/pull/1811#discussion_r390166734
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java
 ##########
 @@ -451,12 +449,9 @@ public boolean addRule(RelOptRule rule) {
     assert added;
 
     final String ruleName = rule.toString();
-    if (ruleNames.put(ruleName, rule.getClass())) {
-      Set<Class> x = ruleNames.get(ruleName);
-      if (x.size() > 1) {
-        throw new RuntimeException("Rule description '" + ruleName
-            + "' is not unique; classes: " + x);
-      }
+    if (ruleNames.put(ruleName, rule) != null) {
+      throw new RuntimeException("Rule description '" + ruleName
 
 Review comment:
   Did you merge the master code instead of rebase ? The change seems not that necessary.

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