Skip to content

Commit 1fc807b

Browse files
committed
add cross cluster IT
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
1 parent a108d1e commit 1fc807b

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

integ-test/src/test/java/org/opensearch/sql/security/CalciteCrossClusterSearchIT.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,4 +239,31 @@ public void testTimeBinCrossCluster() throws IOException {
239239
rows("2025-07-28 01:00:00", 7623),
240240
rows("2025-07-28 02:00:00", 9187));
241241
}
242+
243+
@Test
244+
public void testCrossClusterRegexBasic() throws IOException {
245+
JSONObject result =
246+
executeQuery(
247+
String.format(
248+
"search source=%s | regex firstname='.*att.*' | fields firstname",
249+
TEST_INDEX_BANK_REMOTE));
250+
verifyDataRows(result, rows("Hattie"));
251+
}
252+
253+
@Test
254+
public void testCrossClusterRegexWithNegation() throws IOException {
255+
JSONObject result =
256+
executeQuery(
257+
String.format(
258+
"search source=%s | regex firstname!='.*att.*' | fields firstname",
259+
TEST_INDEX_BANK_REMOTE));
260+
verifyDataRows(
261+
result,
262+
rows("Virginia"),
263+
rows("Elinor"),
264+
rows("Dillard"),
265+
rows("Dale"),
266+
rows("Amber JOHnny"),
267+
rows("Nanette"));
268+
}
242269
}

0 commit comments

Comments
 (0)