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

Add regex_program strings replacing java APIs and tests #12701

Merged

Conversation

cindyyuanjiang
Copy link
Contributor

@cindyyuanjiang cindyyuanjiang commented Feb 4, 2023

Signed-off-by: Cindy Jiang [email protected]

Description

This PR adds replace_re, replace_with_backrefs related regex_program java APIs and unit tests.
Part of work for NVIDIA/spark-rapids#7295.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@github-actions github-actions bot added the Java Affects Java cuDF API. label Feb 4, 2023
@cindyyuanjiang cindyyuanjiang added feature request New feature or request non-breaking Non-breaking change labels Feb 4, 2023
@codecov
Copy link

codecov bot commented Feb 4, 2023

Codecov Report

❗ No coverage uploaded for pull request base (branch-23.04@fea6288). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@               Coverage Diff               @@
##             branch-23.04   #12701   +/-   ##
===============================================
  Coverage                ?   85.81%           
===============================================
  Files                   ?      158           
  Lines                   ?    25154           
  Branches                ?        0           
===============================================
  Hits                    ?    21587           
  Misses                  ?     3567           
  Partials                ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cindyyuanjiang cindyyuanjiang marked this pull request as ready for review February 6, 2023 21:49
@cindyyuanjiang cindyyuanjiang requested a review from a team as a code owner February 6, 2023 21:49
Copy link
Member

@jlowe jlowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit on updating a deprecated method implementation, lgtm.

cudf::jni::native_jstring pattern(env, j_pattern);
auto repl = reinterpret_cast<cudf::string_scalar const *>(j_repl);
return release_as_jlong(cudf::strings::replace_re(scv, pattern.get(), *repl, j_maxrepl));
auto const column_view = reinterpret_cast<cudf::column_view const *>(j_column_view);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my comment on other PR, avoid to use column_view name. This also applies to below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thank you!

@cindyyuanjiang
Copy link
Contributor Author

cindyyuanjiang commented Feb 7, 2023

Minor nit on updating a deprecated method implementation, lgtm.

@jlowe Thank you! I am not sure I understand the nit. Do you mind elaborating a bit?

Copy link
Member

@jlowe jlowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I understand the nit. Do you mind elaborating a bit?

My apologies, I apparently didn't fully submit my original suggestion the first time. Should be present on this round of review.

java/src/main/java/ai/rapids/cudf/ColumnView.java Outdated Show resolved Hide resolved
@cindyyuanjiang
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 0161ba8 into rapidsai:branch-23.04 Feb 8, 2023
@cindyyuanjiang cindyyuanjiang deleted the replacing-regex-program-apis branch February 8, 2023 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request Java Affects Java cuDF API. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants