You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by "julianhyde (via GitHub)" <gi...@apache.org> on 2023/06/13 23:45:21 UTC

[GitHub] [calcite] julianhyde commented on a diff in pull request #3247: [CALCITE-5733] Simplify "a = ARRAY[1,2] AND a = ARRAY[2,3]" to "false"

julianhyde commented on code in PR #3247:
URL: https://github.com/apache/calcite/pull/3247#discussion_r1228811712


##########
core/src/main/java/org/apache/calcite/rex/RexSimplify.java:
##########
@@ -2622,21 +2644,34 @@ private static class VariableCollector extends RexVisitorImpl<Void> {
 
   /** Represents a simple Comparison.
    *
-   * <p>Left hand side is a {@link RexNode}, right hand side is a literal.
+   * <p>Left hand side is a {@link RexNode}, right hand side is a literal/array-call.
    */
   private static class Comparison implements Predicate {
     final RexNode ref;
     final SqlKind kind;
+    //RexCall or RexLiteral

Review Comment:
   It might be better to change the `RexLiteral literal` field to `RexNode argument`, and not create a separate `RexCall rexCall` field. If there's one field we can check that it is not null.



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