Skip to content

Commit 028e074

Browse files
committed
Fix ExplainIT test
Signed-off-by: currantw <[email protected]>
1 parent e8494f2 commit 028e074

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void testTrendlineWithSortPushDownExplain() throws Exception {
131131

132132
@Test
133133
public void testExpand() throws Exception {
134-
String query = StringUtils.format("source=%s | expand team", TEST_INDEX_EXPAND_FLATTEN);
134+
String query = StringUtils.format("source=%s | expand teams", TEST_INDEX_EXPAND_FLATTEN);
135135
String actual = explainQueryToString(query);
136136
String expected = loadFromFile("expectedOutput/ppl/explain_expand.json");
137137
assertJsonEquals(expected, actual);

integ-test/src/test/resources/expectedOutput/ppl/explain_expand.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
"root": {
33
"name": "ProjectOperator",
44
"description": {
5-
"fields": "[city, team]"
5+
"fields": "[teams, city, location]"
66
},
77
"children": [
88
{
99
"name": "ExpandOperator",
1010
"description": {
1111
"expandField": {
12-
"attr": "team",
13-
"rawPath": "team",
12+
"attr": "teams",
13+
"rawPath": "teams",
1414
"paths": [
15-
"team"
15+
"teams"
1616
],
1717
"type": "STRUCT"
1818
}
@@ -21,7 +21,7 @@
2121
{
2222
"name": "OpenSearchIndexScan",
2323
"description": {
24-
"request": "OpenSearchQueryRequest(indexName=opensearch-sql_test_index_expand, sourceBuilder={\"from\":0,\"size\":10000,\"timeout\":\"1m\"}, needClean=true, searchDone=false, pitId=null, cursorKeepAlive=null, searchAfter=null, searchResponse=null)"
24+
"request": "OpenSearchQueryRequest(indexName=opensearch-sql_test_index_expand_flatten, sourceBuilder={\"from\":0,\"size\":10000,\"timeout\":\"1m\"}, needClean=true, searchDone=false, pitId=null, cursorKeepAlive=null, searchAfter=null, searchResponse=null)"
2525
},
2626
"children": []
2727
}

integ-test/src/test/resources/expectedOutput/ppl/explain_flatten.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"root": {
33
"name": "ProjectOperator",
44
"description": {
5-
"fields": "[name, location, country, province, coordinates, state]"
5+
"fields": "[teams, city, location, country, province, coordinates, state]"
66
},
77
"children": [
88
{
@@ -21,12 +21,12 @@
2121
{
2222
"name": "OpenSearchIndexScan",
2323
"description": {
24-
"request": "OpenSearchQueryRequest(indexName=opensearch-sql_test_index_flatten, sourceBuilder={\"from\":0,\"size\":10000,\"timeout\":\"1m\"}, needClean=true, searchDone=false, pitId=null, cursorKeepAlive=null, searchAfter=null, searchResponse=null)"
24+
"request": "OpenSearchQueryRequest(indexName=opensearch-sql_test_index_expand_flatten, sourceBuilder={\"from\":0,\"size\":10000,\"timeout\":\"1m\"}, needClean=true, searchDone=false, pitId=null, cursorKeepAlive=null, searchAfter=null, searchResponse=null)"
2525
},
2626
"children": []
2727
}
2828
]
2929
}
3030
]
3131
}
32-
}
32+
}

0 commit comments

Comments
 (0)