Skip to content

Commit c7ddd27

Browse files
committed
Enabled and added ITs
Signed-off-by: Guian Gumpac <[email protected]>
1 parent 54699c3 commit c7ddd27

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

integ-test/src/test/java/org/opensearch/sql/sql/NestedIT.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ public void nested_function_with_arrays_in_an_aggregate_function_in_select_test(
8686
verifyDataRows(result, rows(19));
8787
}
8888

89-
// TODO not currently supported by legacy, should we add implementation in AstBuilder?
90-
@Disabled
9189
public void nested_function_in_a_function_in_select_test() {
9290
String query = "SELECT upper(nested(message.info)) FROM " +
9391
TEST_INDEX_NESTED_TYPE_WITHOUT_ARRAYS;
@@ -98,9 +96,24 @@ public void nested_function_in_a_function_in_select_test() {
9896
rows("B"),
9997
rows("C"),
10098
rows("C"),
99+
rows("A"),
101100
rows("ZZ"));
102101
}
103102

103+
public void nested_function_in_two_functions_in_select_test() {
104+
String query = "SELECT add(1, abs(nested(message.dayOfWeek))) FROM " +
105+
TEST_INDEX_NESTED_TYPE_WITHOUT_ARRAYS;
106+
JSONObject result = executeJdbcRequest(query);
107+
108+
verifyDataRows(result,
109+
rows(2),
110+
rows(3),
111+
rows(2),
112+
rows(5),
113+
rows(6),
114+
rows(7));
115+
}
116+
104117
@Test
105118
public void nested_function_with_array_of_multi_nested_field_test() {
106119
String query = "SELECT nested(message.author.name) FROM " + TEST_INDEX_MULTI_NESTED_TYPE;

0 commit comments

Comments
 (0)