Skip to content

Commit

Permalink
Fixed quote issue.
Browse files Browse the repository at this point in the history
Signed-off-by: MitchellGale-BitQuill <[email protected]>
  • Loading branch information
MitchellGale committed Dec 20, 2022
1 parent 005c48e commit c82f0b5
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions integ-test/src/test/java/org/opensearch/sql/sql/TextTypeIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,35 +149,35 @@ public void whereWildcardtextDataFieldNoFields() {
public void selectLocateKeyword() {
var result = executeJdbcRequest(String.format("select locate(\\\"key*\\\", typeKeyword) from %s", TEST_INDEX_TEXTKEYWORD));
verifySchema(result,
schema("locate(\\\"key*\\\", typeKeyword)", null, "integer"));
schema("locate(\"key*\", typeKeyword)", null, "integer"));
}

@Test
public void selectLocateText() {
var result = executeJdbcRequest(String.format("select locate(\\\"text*\\\", typeText) from %s", TEST_INDEX_TEXTKEYWORD));
verifySchema(result,
schema("locate(\\\"text*\\\", typeText)", null, "integer"));
schema("locate(\"text*\", typeText)", null, "integer"));
}

@Test
public void selectLocateTextKeywordFieldNoFieldData() {
var result = executeJdbcRequest(String.format("select locate(\\\"keyword*\\\", typeKeywordFieldNoFieldData) from %s", TEST_INDEX_TEXTKEYWORD));
verifySchema(result,
schema("locate(\\\"keyword*\\\", typeKeywordFieldNoFieldData)", null, "integer"));
schema("locate(\"keyword*\", typeKeywordFieldNoFieldData)", null, "integer"));
}

@Test
public void selectLocateTypeTextFieldData() {
var result = executeJdbcRequest(String.format("select locate(\\\"keyFD*\\\", typeTextFieldData) from %s", TEST_INDEX_TEXTKEYWORD));
verifySchema(result,
schema("locate(\\\"keyFD*\\\", typeTextFieldData)", null, "integer"));
schema("locate(\"keyFD*\", typeTextFieldData)", null, "integer"));
}

@Test
public void selectLocateTextDataFieldNoFields() {
var result = executeJdbcRequest(String.format("select locate(\\\"textFDNF*\\\", textDataFieldNoFields) from %s", TEST_INDEX_TEXTKEYWORD));
verifySchema(result,
schema("locate(\\\"textFDNF*\\\", textDataFieldNoFields)", null, "integer"));
schema("locate(\"textFDNF*\", textDataFieldNoFields)", null, "integer"));
}

// Position
Expand All @@ -194,11 +194,7 @@ public void selectPositionText() throws IOException {
var result = executeQuery(String.format("select POSITION(\\\"text\\\" IN typeText) from %s", TEST_INDEX_TEXTKEYWORD));
verifySchema(result,
schema("typeText", null, "double"));
// //assertFalse(result.has("error"));
// if(result.has("error")) {
// fail(result.optJSONObject("error").getString("reason") + "\n" + result.optJSONObject("error").getString("details"));
// } else {
// assert(true);

// }
}

Expand Down

0 comments on commit c82f0b5

Please sign in to comment.