Skip to content

Commit

Permalink
[CALCITE-4188] Add hints from review
Browse files Browse the repository at this point in the history
  • Loading branch information
kramerul committed Dec 9, 2024
1 parent c4d955f commit 626269a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public JdbcCorrelationDataContext(DataContext delegate, Object[] parameters) {
this.delegate = delegate;
this.parameters = parameters;
}

@Override public @Nullable SchemaPlus getRootSchema() {
return delegate.getRootSchema();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public Result implement(RelNode node) {
return context;
}
List<RelDataTypeField> fieldList = variable.getType().getFieldList();
// We need to provide a context which also includes the correlation variables
// as dynamic parameters.
return new Context(dialect, fieldList.size()) {
@Override public SqlNode field(int ordinal) {
RelDataTypeField field = fieldList.get(ordinal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,10 @@ private LockWrapper exclusiveCleanDb(Connection c) throws SQLException {
});
}

/**
* Test case for
* <a href="https://issues.apache.org/jira/browse/CALCITE-4188">[CALCITE-4188]
* Support EnumerableBatchNestedLoopJoin for JDBC</a>. */
@Test void testBatchNestedLoopJoinPlan() {
final String sql = "SELECT *\n"
+ "FROM \"s\".\"emps\" A\n"
Expand Down

0 comments on commit 626269a

Please sign in to comment.