diff --git a/core/src/main/java/org/apache/calcite/rel/core/Project.java b/core/src/main/java/org/apache/calcite/rel/core/Project.java index 4a1033c3deae..ddcb037db924 100644 --- a/core/src/main/java/org/apache/calcite/rel/core/Project.java +++ b/core/src/main/java/org/apache/calcite/rel/core/Project.java @@ -144,9 +144,7 @@ protected Project(RelInput input) { Util.transform( Optional.ofNullable(input.getIntegerList("variablesSet")) .orElse(ImmutableList.of()), - id -> new CorrelationId(id) - ) - )); + id -> new CorrelationId(id)))); } //~ Methods ---------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java b/core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java index 235f75639047..9ad0525fde4c 100644 --- a/core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java +++ b/core/src/main/java/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java @@ -1198,8 +1198,9 @@ public Result visit(Uncollect e) { } } final SqlNode unnestNode = SqlStdOperatorTable.UNNEST.createCall(POS, node); - final List operands = createAsFullOperands(e.getRowType(), unnestNode, - requireNonNull(x.neededAlias, () -> "x.neededAlias is null, node is " + x.node)); + final String neededAlias = + requireNonNull(x.neededAlias, () -> "x.neededAlias is null, node is " + x.node); + final List operands = createAsFullOperands(e.getRowType(), unnestNode, neededAlias); final SqlNode asNode = SqlStdOperatorTable.AS.createCall(POS, operands); return result(asNode, ImmutableList.of(Clause.FROM), e, null); } diff --git a/core/src/test/java/org/apache/calcite/plan/volcano/TraitPropagationTest.java b/core/src/test/java/org/apache/calcite/plan/volcano/TraitPropagationTest.java index f86b94ad89a8..46851c184198 100644 --- a/core/src/test/java/org/apache/calcite/plan/volcano/TraitPropagationTest.java +++ b/core/src/test/java/org/apache/calcite/plan/volcano/TraitPropagationTest.java @@ -161,8 +161,8 @@ public RelDataType getRowType(RelDataTypeFactory typeFactory) { // project s column - RelNode project = LogicalProject.create(rt1, - ImmutableList.of(), + RelNode project = + LogicalProject.create(rt1, ImmutableList.of(), ImmutableList.of( (RexNode) rexBuilder.makeInputRef(stringType, 0), rexBuilder.makeInputRef(integerType, 1)), diff --git a/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java b/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java index ec3a14c07c5d..fdbbe88c8f7d 100644 --- a/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java +++ b/core/src/test/java/org/apache/calcite/test/JdbcAdapterTest.java @@ -182,8 +182,8 @@ class JdbcAdapterTest { rs.close(); - rs = calciteConnection.prepareStatement( - "SELECT ID, T.X, R.Y \"hello\" FROM T2, UNNEST(V1) T(X), UNNEST(V2) R(Y)") + rs = calciteConnection + .prepareStatement("SELECT ID, T.X, R.Y \"hello\" FROM T2, UNNEST(V1) T(X), UNNEST(V2) R(Y)") .executeQuery(); int count = 0; diff --git a/core/src/test/java/org/apache/calcite/test/RelMetadataTest.java b/core/src/test/java/org/apache/calcite/test/RelMetadataTest.java index eca10b17e9a3..806f61aa878e 100644 --- a/core/src/test/java/org/apache/calcite/test/RelMetadataTest.java +++ b/core/src/test/java/org/apache/calcite/test/RelMetadataTest.java @@ -1618,8 +1618,8 @@ private void checkCollation(RelOptCluster cluster, RelOptTable empTable, assertThat(collations.get(0).getFieldCollations().get(1).getFieldIndex(), equalTo(0)); - final LogicalProject project = LogicalProject.create(empSort, - ImmutableList.of(), + final LogicalProject project = + LogicalProject.create(empSort, ImmutableList.of(), projects, ImmutableList.of("a", "b", "c", "d"), ImmutableSet.of());