Skip to content

Commit 431cc3f

Browse files
committed
Fix formatting issues
Signed-off-by: Lorenzo Stella <stellalo@amazon.de>
1 parent 012cb0b commit 431cc3f

2 files changed

Lines changed: 17 additions & 22 deletions

File tree

api/src/main/java/org/opensearch/sql/api/UnifiedQueryPlanner.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,11 @@ public class UnifiedQueryPlanner {
6868
* @param settings configuration settings for query processing
6969
*/
7070
public UnifiedQueryPlanner(
71-
QueryType queryType,
72-
SchemaPlus rootSchema,
73-
String defaultPath,
74-
Settings settings
75-
) {
76-
this.queryType = queryType;
77-
this.parser = buildQueryParser(queryType);
78-
this.config = buildCalciteConfig(rootSchema, defaultPath);
79-
this.settings = settings;
71+
QueryType queryType, SchemaPlus rootSchema, String defaultPath, Settings settings) {
72+
this.queryType = queryType;
73+
this.parser = buildQueryParser(queryType);
74+
this.config = buildCalciteConfig(rootSchema, defaultPath);
75+
this.settings = settings;
8076
}
8177

8278
/**
@@ -135,8 +131,7 @@ private UnresolvedPlan parse(String query) {
135131
AstStatementBuilder astStmtBuilder =
136132
new AstStatementBuilder(
137133
new AstBuilder(query, settings),
138-
AstStatementBuilder.StatementBuilderContext.builder().build()
139-
);
134+
AstStatementBuilder.StatementBuilderContext.builder().build());
140135
Statement statement = cst.accept(astStmtBuilder);
141136

142137
if (statement instanceof Query) {

api/src/test/java/org/opensearch/sql/api/UnifiedQueryPlannerTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,15 @@ public RelDataType getRowType(RelDataTypeFactory typeFactory) {
4848
},
4949
"index2",
5050
new AbstractTable() {
51-
@Override
52-
public RelDataType getRowType(RelDataTypeFactory typeFactory) {
51+
@Override
52+
public RelDataType getRowType(RelDataTypeFactory typeFactory) {
5353
return typeFactory.createStructType(
5454
List.of(
5555
typeFactory.createSqlType(SqlTypeName.INTEGER),
5656
typeFactory.createSqlType(SqlTypeName.FLOAT)),
5757
List.of("id", "value"));
58-
}
59-
}
60-
);
58+
}
59+
});
6160
}
6261
};
6362

@@ -201,12 +200,13 @@ public void testPlanPropagatingSyntaxCheckException() {
201200

202201
@Test
203202
public void testJoinQuery() {
204-
UnifiedQueryPlanner planner = UnifiedQueryPlanner.builder()
205-
.language(QueryType.PPL)
206-
.catalog("opensearch", testSchema)
207-
.defaultNamespace("opensearch")
208-
.settings(testSettings)
209-
.build();
203+
UnifiedQueryPlanner planner =
204+
UnifiedQueryPlanner.builder()
205+
.language(QueryType.PPL)
206+
.catalog("opensearch", testSchema)
207+
.defaultNamespace("opensearch")
208+
.settings(testSettings)
209+
.build();
210210

211211
planner.plan("source = index | join on index.id = index2.id index2");
212212
}

0 commit comments

Comments
 (0)