You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "libenchao (via GitHub)" <gi...@apache.org> on 2023/04/17 04:51:30 UTC

[GitHub] [calcite] libenchao commented on a diff in pull request #3143: [CALCITE-5639] eliminate IS_NOT_NULL check if LIKE expression on the same column is present

libenchao commented on code in PR #3143:
URL: https://github.com/apache/calcite/pull/3143#discussion_r1168159208


##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -2599,6 +2602,22 @@ default boolean allowedInOr(RelOptPredicateList predicates) {
     }
   }
 
+  /**
+   * Visitor which finds all inputs used by an expressions.
+   */
+  private static class VariableCollector extends RexVisitorImpl<Void> {
+    private final Set<RexInputRef> refs = new LinkedHashSet<>();

Review Comment:
   I have the same feeling with @asolimando, usually a `LinkedHashSet` would make me wonder what's its purpose to use it instead of a `HashSet`, which will increase the cost of understanding.
   
   If we have a reason, we'd better write it into the comment. Else, I would prefer to use the most general one for the above reason. WDYT?



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

To unsubscribe, e-mail: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org