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 2020/08/24 19:05:31 UTC

[GitHub] [calcite] amaliujia commented on a change in pull request #2116: [CALCITE-4188] support EnumerableBatchNestedLoopJoin inJdbcToEnumerab…

amaliujia commented on a change in pull request #2116:
URL: https://github.com/apache/calcite/pull/2116#discussion_r475832464



##########
File path: core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcToEnumerableConverter.java
##########
@@ -195,7 +235,14 @@ public Result implement(EnumerableRelImplementor implementor, Prefer pref) {
   }
 
   private List<ConstantExpression> toIndexesTableExpression(SqlString sqlString) {
-    return sqlString.getDynamicParameters().stream()
+    return Optional.ofNullable(sqlString.getDynamicParameters()).orElse(ImmutableList.of()).stream()
+        .map(Expressions::constant)
+        .collect(Collectors.toList());
+  }
+
+  private List<ConstantExpression> toIndexCorrelateExpression(SqlString sqlString,
+      StringBuilder querySqlSb, SqlDialect sqlDialect) {
+    return sqlDialect.getDynamicTypeIndexs(querySqlSb, sqlString.getSql()).stream()

Review comment:
       I am not sure whether `getDynamicTypeIndexs` should be in SqlDialect. 
   
   Is this the format of SQL that this function recognizes defined in SQL standard? What kind of vendors support it? Is it a common used syntax? 

##########
File path: core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcToEnumerableConverter.java
##########
@@ -78,7 +89,7 @@ protected JdbcToEnumerableConverter(
   }
 
   @Override public RelOptCost computeSelfCost(RelOptPlanner planner,
-      RelMetadataQuery mq) {
+                                              RelMetadataQuery mq) {
     return super.computeSelfCost(planner, mq).multiplyBy(.1);

Review comment:
       fix indents 




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