Skip to content

Commit d73e73f

Browse files
committed
Apply spotless formatting
Signed-off-by: Eric Wei <mengwei.eric@gmail.com>
1 parent 7b30898 commit d73e73f

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

sql/src/main/java/org/opensearch/sql/sql/parser/AstBuilder.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ public UnresolvedPlan visitTableFunctionRelation(TableFunctionRelationContext ct
201201
.forEach(
202202
arg -> {
203203
String argName =
204-
StringUtils.unquoteIdentifier(arg.ident().getText())
205-
.toLowerCase(Locale.ROOT);
204+
StringUtils.unquoteIdentifier(arg.ident().getText()).toLowerCase(Locale.ROOT);
206205
UnresolvedExpression argValue = visitAstExpression(arg.functionArg());
207206
args.add(new UnresolvedArgument(argName, argValue));
208207
});

sql/src/test/java/org/opensearch/sql/sql/parser/AstBuilderTest.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,10 @@ public void can_build_from_table_function_with_where_order_limit() {
168168
ImmutableList.of(
169169
new UnresolvedArgument("table", stringLiteral("products")),
170170
new UnresolvedArgument("field", stringLiteral("embedding")),
171-
new UnresolvedArgument(
172-
"vector", stringLiteral("[0.1,0.2]")),
173-
new UnresolvedArgument(
174-
"option", stringLiteral("k=10"))))),
171+
new UnresolvedArgument("vector", stringLiteral("[0.1,0.2]")),
172+
new UnresolvedArgument("option", stringLiteral("k=10"))))),
175173
function("=", qualifiedName("s", "category"), stringLiteral("shoes"))),
176-
field(
177-
qualifiedName("s", "_score"),
178-
argument("asc", booleanLiteral(false)))),
174+
field(qualifiedName("s", "_score"), argument("asc", booleanLiteral(false)))),
179175
5,
180176
0),
181177
alias("s.title", qualifiedName("s", "title")),
@@ -241,8 +237,7 @@ public void table_function_allows_alias_without_as_keyword() {
241237
new UnresolvedArgument("table", stringLiteral("products")),
242238
new UnresolvedArgument("vector", stringLiteral("[0.1]"))))),
243239
AllFields.of()),
244-
buildAST(
245-
"SELECT * FROM vectorSearch(table='products', vector='[0.1]') v"));
240+
buildAST("SELECT * FROM vectorSearch(table='products', vector='[0.1]') v"));
246241
}
247242

248243
@Test

0 commit comments

Comments
 (0)