File tree Expand file tree Collapse file tree
integ-test/src/test/java/org/opensearch/sql/security Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments