Skip to content

Commit 423365b

Browse files
committed
SPOTLESS
Signed-off-by: Andrew Carbonetto <[email protected]>
1 parent cbc0552 commit 423365b

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

integ-test/src/test/java/org/opensearch/sql/ppl/JsonFunctionsIT.java

+9-10
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,9 @@ public void test_cast_json_scalar_to_type() throws IOException {
175175
result =
176176
executeQuery(
177177
String.format(
178-
"source=%s | " +
179-
"where test_name='json scalar boolean true' OR test_name='json scalar boolean false' | " +
180-
"eval casted=cast(json(json_string) as boolean) | " +
181-
"fields test_name, casted",
178+
"source=%s | where test_name='json scalar boolean true' OR test_name='json scalar"
179+
+ " boolean false' | eval casted=cast(json(json_string) as boolean) | fields"
180+
+ " test_name, casted",
182181
TEST_INDEX_JSON_TEST));
183182
verifySchema(result, schema("test_name", null, "string"), schema("casted", null, "boolean"));
184183
verifyDataRows(
@@ -192,16 +191,17 @@ public void test_json_object() throws IOException {
192191
result =
193192
executeQuery(
194193
String.format(
195-
"source=%s | where json_valid(json_string) | " +
196-
"eval obj=json_object('key', json(json_string)) | " +
197-
"fields test_name, obj",
194+
"source=%s | where json_valid(json_string) | "
195+
+ "eval obj=json_object('key', json(json_string)) | "
196+
+ "fields test_name, obj",
198197
TEST_INDEX_JSON_TEST));
199198
verifySchema(result, schema("test_name", null, "string"), schema("obj", null, "struct"));
200199
verifyDataRows(
201200
result,
202201
rows(
203202
"json nested object",
204-
new JSONObject(Map.of("key", Map.of("a", "1", "b", Map.of("c", "3"), "d", List.of(1, 2, 3))))),
203+
new JSONObject(
204+
Map.of("key", Map.of("a", "1", "b", Map.of("c", "3"), "d", List.of(1, 2, 3))))),
205205
rows("json object", new JSONObject(Map.of("key", Map.of("a", "1", "b", "2")))),
206206
rows("json array", new JSONObject(Map.of("key", List.of(1, 2, 3, 4)))),
207207
rows("json scalar string", Map.of("key", "abc")),
@@ -210,7 +210,6 @@ public void test_json_object() throws IOException {
210210
rows("json scalar double", Map.of("key", 2.99792458e8)),
211211
rows("json scalar boolean true", Map.of("key", true)),
212212
rows("json scalar boolean false", Map.of("key", false)),
213-
rows("json empty string", Map.of())
214-
);
213+
rows("json empty string", Map.of()));
215214
}
216215
}

0 commit comments

Comments
 (0)