-
Notifications
You must be signed in to change notification settings - Fork 235
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
Add partial support for line begin and end anchors in regexp_replace #4155
Add partial support for line begin and end anchors in regexp_replace #4155
Conversation
Signed-off-by: Andy Grove <andygrove@nvidia.com>
Signed-off-by: Andy Grove <andygrove@nvidia.com>
tests/src/test/scala/com/nvidia/spark/rapids/RegularExpressionTranspilerSuite.scala
Show resolved
Hide resolved
|| isRegexChar(parts.head, '$'))) { | ||
throw new RegexUnsupportedException("regexp_replace on GPU does not support ^ or $") | ||
if (parts.forall { | ||
case RegexChar(ch) => ch == '^' || ch == '$' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to worry about any degenerate cases of other directives (e.g.: empty group, character class, etc.) that would essentially be equivalent to just having these characters in the pattern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For empty groups, we would fall back to CPU, but I did find one case that is not detected by this rule ((^)($)
) so will spend some more time on this.
Signed-off-by: Andy Grove <andygrove@nvidia.com>
Converting this to WIP since there are regressions caused by other regexp PRs that were recently merged |
build |
build |
1 similar comment
build |
patterns.foreach(pattern => | ||
assertUnsupported(pattern, "nothing to repeat")) | ||
assertUnsupported(pattern, replace = false, | ||
"cuDF does not support null characters in regular expressions")) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is no longer valid and the patterns tested here have moved to a different test
Sign-off check is failing due to:
|
build |
Signed-off-by: Andy Grove <andygrove@nvidia.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is failing due to an unrelated issue, see #4423.
build |
build |
Closes #4091