Skip to content

Commit

Permalink
Fix Style
Browse files Browse the repository at this point in the history
  • Loading branch information
kramerul committed Jun 28, 2023
1 parent 59c25ae commit eb5c275
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
4 changes: 1 addition & 3 deletions core/src/main/java/org/apache/calcite/rel/core/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 ----------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1198,8 +1198,9 @@ public Result visit(Uncollect e) {
}
}
final SqlNode unnestNode = SqlStdOperatorTable.UNNEST.createCall(POS, node);
final List<SqlNode> 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<SqlNode> operands = createAsFullOperands(e.getRowType(), unnestNode, neededAlias);
final SqlNode asNode = SqlStdOperatorTable.AS.createCall(POS, operands);
return result(asNode, ImmutableList.of(Clause.FROM), e, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit eb5c275

Please sign in to comment.