Skip to content

Commit

Permalink
refine test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Heng Qian <[email protected]>
  • Loading branch information
qianheng-aws committed Aug 9, 2024
1 parent 48cf382 commit 460189e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ public void explainAlias() throws IOException {

String result =
explainQuery(
String.format("SELECT (age + 1) AS agePlusOne FROM %s LIMIT 10", TEST_INDEX_ACCOUNT));
String.format(
"SELECT city, (age + 1) AS agePlusOne, (balance + 1000) as newBalance FROM %s LIMIT"
+ " 10",
TEST_INDEX_ACCOUNT));
Assert.assertThat(
result.replaceAll("\\s+", ""), equalTo(expectedOutput.replaceAll("\\s+", "")));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"root": {
"name": "ProjectOperator",
"description": {
"fields": "[(age+1) AS agePlusOne]"
"fields": "[city, (age+1) AS agePlusOne, (balance+1000) AS newBalance]"
},
"children": [
{
"name": "OpenSearchIndexScan",
"description": {
"request": "OpenSearchQueryRequest(indexName=opensearch-sql_test_index_account,sourceBuilder={\"from\":0,\"size\":10,\"timeout\":\"1m\",\"_source\":{\"includes\":[\"age\"],\"excludes\":[]}},searchDone=false)"
"request": "OpenSearchQueryRequest(indexName=opensearch-sql_test_index_account,sourceBuilder={\"from\":0,\"size\":10,\"timeout\":\"1m\",\"_source\":{\"includes\":[\"age\",\"city\",\"balance\"],\"excludes\":[]}},searchDone=false)"
},
"children": []
}
Expand Down

0 comments on commit 460189e

Please sign in to comment.