Skip to content

Commit

Permalink
update no_match test to test other values for idx
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove committed Dec 10, 2021
1 parent a3f0595 commit cd21426
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion integration_tests/src/main/python/string_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,10 @@ def test_regexp_extract_no_match():
gen = mk_str_gen('[abcd]{1,3}[0-9]{1,3}[abcd]{1,3}')
assert_gpu_and_cpu_are_equal_collect(
lambda spark: unary_op_df(spark, gen).selectExpr(
'regexp_extract(a, "^([0-9]+)([a-z]+)([0-9]+)$", 1)'),
'regexp_extract(a, "^([0-9]+)([a-z]+)([0-9]+)$", 0)',
'regexp_extract(a, "^([0-9]+)([a-z]+)([0-9]+)$", 1)',
'regexp_extract(a, "^([0-9]+)([a-z]+)([0-9]+)$", 2)',
'regexp_extract(a, "^([0-9]+)([a-z]+)([0-9]+)$", 3)'),
conf={'spark.rapids.sql.expression.RegExpExtract': 'true'})

# if we determine that the index is out of range we fall back to CPU and let
Expand Down

0 comments on commit cd21426

Please sign in to comment.