Skip to content

Commit 412ba1d

Browse files
committed
Fixed issue with data duplication.
Signed-off-by: MitchellGale-BitQuill <[email protected]>
1 parent 6b5e259 commit 412ba1d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public void selectPositionKeyword() {
156156

157157
@Test
158158
public void selectPositionText() {
159-
executeJdbcRequest(String.format("select POSITION(text IN typeText) from %s", TEST_INDEX_TEXTKEYWORD));
159+
executeJdbcRequest(String.format("select POSITION(\\\"text\\\" IN typeText) from %s", TEST_INDEX_TEXTKEYWORD));
160160
}
161161

162162
@Test
@@ -166,7 +166,7 @@ public void selectPositionTextKeywordFieldNoFieldData() {
166166

167167
@Test
168168
public void selectPositionTypeTextFieldData() {
169-
executeJdbcRequest(String.format("select POSITION(keyFD IN typeTextFieldData) from %s", TEST_INDEX_TEXTKEYWORD));
169+
executeJdbcRequest(String.format("select POSITION(\\\"keyFD\\\" IN typeTextFieldData) from %s", TEST_INDEX_TEXTKEYWORD));
170170
}
171171

172172
@Test

integ-test/src/test/resources/text_keyword_index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{"index": {"_id":"1"}}
22
{"typeKeyword": "key00", "typeText": "text00", "typeKeywordFieldNoFieldData": "keyword00","typeTextFieldData": "keyFD00", "typeKeywordFieldData": "textFD00", "textDataFieldNoFields": "textFDNF00","int0": 0}
33
{"index": {"_id":"2"}}
4-
{"typeKeyword": "key01", "typeText": "text01", "typeKeywordFieldNoFieldData": "keyword01", "typeTextFieldData": "keyFD01", "typeTextFieldData": "textFD01OverTen", "textDataFieldNoFields": "textFDNF01", "int0": 1}
4+
{"typeKeyword": "key01", "typeText": "text01", "typeKeywordFieldNoFieldData": "keyword01", "typeTextFieldData": "keyFD01", "typeKeywordFieldData": "textFD01OverTen", "textDataFieldNoFields": "textFDNF01", "int0": 1}
55
{"index": {"_id":"3"}}
66
{"typeKeyword": "key02", "typeText": "text02", "typeKeywordFieldNoFieldData": "keyword02", "typeTextFieldData": "keyFD02", "typeKeywordFieldData": "textFD02", "textDataFieldNoFields": "textFDNF02", "int0": 2}
77
{"index": {"_id":"4"}}

0 commit comments

Comments
 (0)