Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Guian Gumpac <guian.gumpac@improving.com>
Signed-off-by: Mitchell Gale <Mitchell.gale@improving.com>
  • Loading branch information
MitchellGale and GumpacG authored Aug 16, 2023
1 parent 1c28bca commit 9d2b176
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public String toString() {
return "\n=================================\n"
+ "Tested Database : "
+ openSearchHostUrlToString()
+ '\n'
+ "\nOther Databases :\n"
+ "Other Databases :\n"
+ otherDbConnectionInfoToString()
+ '\n'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void testINWithDuplicate() throws IOException {
String query =
String.format(
Locale.ROOT,
"SELECT dog_name " + "FROM %s A " + "WHERE holdersName IN (SELECT firstname FROM %s B)",
"SELECT dog_name FROM %s A WHERE holdersName IN (SELECT firstname FROM %s B)",
TEST_INDEX_DOGSUBQUERY,
TEST_INDEX_ACCOUNT);

Expand All @@ -166,7 +166,7 @@ public void nonCorrelatedExists() throws IOException {
String query =
String.format(
Locale.ROOT,
"SELECT e.name " + "FROM %s as e " + "WHERE EXISTS (SELECT * FROM e.projects as p)",
"SELECT e.name FROM %s as e WHERE EXISTS (SELECT * FROM e.projects as p)",
TEST_INDEX_EMPLOYEE_NESTED);

JSONObject response = executeQuery(query);
Expand Down Expand Up @@ -211,7 +211,7 @@ public void nonCorrelatedNotExists() throws IOException {
String query =
String.format(
Locale.ROOT,
"SELECT e.name " + "FROM %s as e " + "WHERE NOT EXISTS (SELECT * FROM e.projects as p)",
"SELECT e.name FROM %s as e WHERE NOT EXISTS (SELECT * FROM e.projects as p)",
TEST_INDEX_EMPLOYEE_NESTED);

JSONObject response = executeQuery(query);
Expand Down Expand Up @@ -261,7 +261,7 @@ public void selectFromSubqueryWithCountShouldPass() throws IOException {
JSONObject result =
executeQuery(
StringUtils.format(
"SELECT t.TEMP as count " + "FROM (SELECT COUNT(*) as TEMP FROM %s) t",
"SELECT t.TEMP as count FROM (SELECT COUNT(*) as TEMP FROM %s) t",
TEST_INDEX_ACCOUNT));

assertThat(result.query("/aggregations/count/value"), equalTo(1000));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void testNonExistingIndex() throws IOException {
public void testNonResolvingIndexPattern() throws IOException {
try {
explainQuery(
"SELECT * " + "FROM opensearch_sql_test_blah_blah* " + "WHERE firstname = 'Leo'");
"SELECT * FROM opensearch_sql_test_blah_blah* WHERE firstname = 'Leo'");
Assert.fail("Expected ResponseException, but none was thrown");

} catch (ResponseException e) {
Expand Down Expand Up @@ -266,7 +266,7 @@ public void testKeywordAliasGroupByUsingTableAlias() throws IOException {
public void testKeywordAliasOrderBy() throws IOException {
String result =
explainQuery(
"SELECT * " + "FROM opensearch-sql_test_index_bank " + "ORDER BY state, lastname ");
"SELECT * FROM opensearch-sql_test_index_bank ORDER BY state, lastname ");
assertThat(result, containsString("\"state.keyword\":{\"order\":\"asc\""));
assertThat(result, containsString("\"lastname\":{\"order\":\"asc\"}"));
}
Expand Down

0 comments on commit 9d2b176

Please sign in to comment.