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 2021/12/05 09:56:19 UTC

[GitHub] [calcite] francesco-gini88 commented on a change in pull request #2620: [CALCITE-4907] JdbcJoin does not convert Join with always true/false …

francesco-gini88 commented on a change in pull request #2620:
URL: https://github.com/apache/calcite/pull/2620#discussion_r762537899



##########
File path: core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcRules.java
##########
@@ -332,6 +332,9 @@ protected JdbcJoinRule(Config config) {
      * @return Whether condition is supported
      */
     private static boolean canJoinOnCondition(RexNode node) {
+      if (node.isAlwaysTrue() || node.isAlwaysFalse()) {
+        return true;
+      }

Review comment:
       shouldn't I check that then the literal is in fact a boolean?
   ```
   case LITERAL:
           return ((RexLiteral) node).getTypeName() == SqlTypeName.BOOLEAN;
   ```
   
   or perhaps there is some guarantee that something that is not a boolean can't show up there?




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