Skip to content

Commit a906a34

Browse files
committed
added test
Signed-off-by: Asif Bashar <asif.bashar@gmail.com>
1 parent 0866bfb commit a906a34

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,24 @@ public void testAddColTotalCommand() throws IOException {
201201
verifyQuery(result);
202202
}
203203
}
204+
@Test
205+
public void testTransposeCommand() throws IOException {
206+
JSONObject result;
207+
try {
208+
executeQuery(String.format("search source=%s | transpose ", TEST_INDEX_BANK));
209+
} catch (ResponseException e) {
210+
result = new JSONObject(TestUtils.getResponseBody(e.getResponse()));
211+
verifyQuery(result);
212+
}
213+
}
204214

205215
@Test
206-
public void testTransposeCommand() throws IOException {
216+
public void testFieldFormatCommand() throws IOException {
207217
JSONObject result;
208218
try {
209-
executeQuery(String.format("search source=%s | transpose ", TEST_INDEX_BANK));
219+
executeQuery(
220+
String.format(
221+
"search source=%s | fieldformat double_balance = balance * 2 ", TEST_INDEX_BANK));
210222
} catch (ResponseException e) {
211223
result = new JSONObject(TestUtils.getResponseBody(e.getResponse()));
212224
verifyQuery(result);

0 commit comments

Comments
 (0)