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 2019/12/11 21:05:46 UTC

[GitHub] [calcite] amaliujia commented on a change in pull request #1647: [CALCITE-3588] Support more operators in Join condition when convert …

amaliujia commented on a change in pull request #1647: [CALCITE-3588] Support more operators in Join condition when convert …
URL: https://github.com/apache/calcite/pull/1647#discussion_r356833180
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java
 ##########
 @@ -193,102 +193,12 @@ public Result setOpToSql(SqlSetOperator operator, RelNode rel) {
    * @param node            Join condition
    * @param leftContext     Left context
    * @param rightContext    Right context
-   * @param leftFieldCount  Number of fields on left result
    * @return SqlNode that represents the condition
    */
-  public static SqlNode convertConditionToSqlNode(RexNode node,
-      Context leftContext,
-      Context rightContext,
-      int leftFieldCount,
-      SqlDialect dialect) {
-    if (node.isAlwaysTrue()) {
-      return SqlLiteral.createBoolean(true, POS);
-    }
-    if (node.isAlwaysFalse()) {
-      return SqlLiteral.createBoolean(false, POS);
-    }
-    if (node instanceof RexInputRef) {
-      Context joinContext = leftContext.implementor().joinContext(leftContext, rightContext);
-      return joinContext.toSql(null, node);
-    }
-    if (!(node instanceof RexCall)) {
-      throw new AssertionError(node);
 
 Review comment:
   Will Calcite lose the ability to does this assertion? 

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