Skip to content

Commit 0f0a280

Browse files
author
krooswu
committed
Update func name
1 parent 6a0ce52 commit 0f0a280

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ protected Result wrapNestedJoin(Result input, RelNode inputRel, String outerAlia
243243
// Extract the underlying SqlSelect from the input Result.
244244
// We manipulate the Select node directly to avoid redundant nesting
245245
// often introduced by Result.asSelect().
246-
final SqlSelect innerSelect = (SqlSelect) input.asSelect();
246+
final SqlSelect innerSelect = input.asSelect();
247247
final SqlNodeList originalSelectList = innerSelect.getSelectList();
248248
final List<String> fieldNames = inputRel.getRowType().getFieldNames();
249249

@@ -302,8 +302,8 @@ public Result visit(Join e) {
302302
final Result leftResult = visitInput(e, 0).resetAlias();
303303
Result rightResult = visitInput(e, 1).resetAlias();
304304

305-
if (dialect.supportWrapNestedJoin(e)) {
306-
String newAlias = "t" + e.getId(); // Calcite-style alias
305+
if (dialect.shouldWrapNestedJoin(e)) {
306+
String newAlias = "t" + e.getId(); // alias
307307
rightResult = wrapNestedJoin(rightResult, e.getRight(), newAlias);
308308
}
309309

core/src/main/java/org/apache/calcite/sql/SqlDialect.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,7 @@ private ContextImpl(DatabaseProduct databaseProduct,
18441844
* @param relNode Relational expression representing a JOIN input
18451845
* @return whether an extra subquery wrapper is required for nested JOINs
18461846
*/
1847-
public boolean supportWrapNestedJoin(RelNode relNode) {
1847+
public boolean shouldWrapNestedJoin(RelNode relNode) {
18481848
return false;
18491849
}
18501850

core/src/main/java/org/apache/calcite/sql/dialect/ClickHouseSqlDialect.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ private static void unparseFloor(SqlWriter writer, SqlCall call) {
412412
writer.endList(frame);
413413
}
414414

415-
@Override public boolean supportWrapNestedJoin(RelNode rel) {
415+
@Override public boolean shouldWrapNestedJoin(RelNode rel) {
416416
if (!(rel instanceof Join)) {
417417
return false;
418418
}

0 commit comments

Comments
 (0)