Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] regexp_replace with back references produces incorrect results on GPU #4503

Closed
andygrove opened this issue Jan 11, 2022 · 0 comments · Fixed by #4556
Closed

[BUG] regexp_replace with back references produces incorrect results on GPU #4503

andygrove opened this issue Jan 11, 2022 · 0 comments · Fixed by #4556
Assignees
Labels
bug Something isn't working P1 Nice to have for release

Comments

@andygrove
Copy link
Contributor

Describe the bug

Spark supports back references in regexp_replace but this functionality does not work correctly on the GPU.

Example

val df = List("a1","b22","333").toDF("str").repartition(2)
val df2 = df.withColumn("repBackRef",regexp_replace('str,"(\\d+)$",";$1"))
df2.show

Expected Results

+---+----------+
|str|repBackRef|
+---+----------+
| a1|       a;1|
|b22|      b;22|
|333|      ;333|
+---+----------+

Actual Results

+---+----------+
|str|repBackRef|
+---+----------+
| a1|      a;$1|
|b22|      b;$1|
|333|       ;$1|
+---+----------+

Steps/Code to reproduce bug
See above.

Expected behavior
We should fall back to CPU, or produce the correct results.

Environment details (please complete the following information)
N/A

Additional context
None

@andygrove andygrove added bug Something isn't working ? - Needs Triage Need team to review and classify labels Jan 11, 2022
@andygrove andygrove added this to the Jan 10 - Jan 28 milestone Jan 11, 2022
@andygrove andygrove self-assigned this Jan 11, 2022
@sameerz sameerz added P1 Nice to have for release and removed ? - Needs Triage Need team to review and classify labels Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Nice to have for release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants