danny0405 commented on a change in pull request #1257: [CALCITE-3115] Add 
JdbcRules which have different JdbcConvention to same VolcanoPlanner's RuleSet
URL: https://github.com/apache/calcite/pull/1257#discussion_r297921600
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcConvention.java
 ##########
 @@ -49,12 +51,23 @@
 
   public final SqlDialect dialect;
   public final Expression expression;
+  private final String signature;
 
   public JdbcConvention(SqlDialect dialect, Expression expression,
       String name) {
     super("JDBC." + name, JdbcRel.class);
     this.dialect = dialect;
     this.expression = expression;
+    this.signature = normalizeName();
+  }
+
+  private String normalizeName() {
+    String id = UUID.randomUUID().toString();
+    return getName().replaceAll("[^-A-Za-z0-9_.():]", ".") + "(" + id + ")";
+  }
 
 Review comment:
   Why we use a uuid a part of the name ? So you mean for same name we can have 
different signature ?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to