Skip to content

Commit dd9d595

Browse files
committed
Add fallback test for lookahead expressions.
Signed-off-by: Igor Peshansky <ipeshansky@nvidia.com>
1 parent 5477e23 commit dd9d595

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

integration_tests/src/main/python/regexp_test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,16 @@ def test_rlike_fallback_possessive_quantifier():
10401040
'RLike',
10411041
conf=_regexp_conf)
10421042

1043+
@allow_non_gpu('ProjectExec', 'RLike')
1044+
def test_rlike_fallback_lookaheads():
1045+
gen = mk_str_gen('(\u20ac|\\w){0,3}a[|b*.$\r\n]{0,2}c\\w{0,3}')
1046+
for pattern in ['a(?=a*)', 'a(?!a*)']:
1047+
assert_gpu_fallback_collect(
1048+
lambda spark, pattern=pattern: unary_op_df(spark, gen).selectExpr(
1049+
f'a rlike "{pattern}"'),
1050+
'RLike',
1051+
conf=_regexp_conf)
1052+
10431053
def test_regexp_extract_all_idx_zero():
10441054
gen = mk_str_gen('[abcd]{0,3}[0-9]{0,3}-[0-9]{0,3}[abcd]{1,3}')
10451055
assert_gpu_and_cpu_are_equal_collect(

0 commit comments

Comments
 (0)