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

Plumb pylibcudf strings contains_re through cudf_polars #15918

Merged

Conversation

brandon-b-miller
Copy link
Contributor

This PR adds cudf-polars code for evaluating the StringFunction.Contains expression node.

Depends on #15880

@brandon-b-miller brandon-b-miller requested a review from a team as a code owner June 4, 2024 17:48
@brandon-b-miller brandon-b-miller requested review from wence- and vyasr June 4, 2024 17:48
@github-actions github-actions bot added Python Affects Python cuDF API. CMake CMake build issue cudf.polars Issues specific to cudf.polars pylibcudf Issues specific to the pylibcudf package labels Jun 4, 2024
@brandon-b-miller brandon-b-miller added feature request New feature or request non-breaking Non-breaking change labels Jun 4, 2024
python/cudf_polars/cudf_polars/dsl/expr.py Outdated Show resolved Hide resolved
python/cudf_polars/cudf_polars/dsl/expr.py Outdated Show resolved Hide resolved
python/cudf_polars/cudf_polars/dsl/expr.py Outdated Show resolved Hide resolved
python/cudf_polars/cudf_polars/dsl/expr.py Outdated Show resolved Hide resolved
python/cudf_polars/tests/test_string.py Show resolved Hide resolved
@github-actions github-actions bot removed CMake CMake build issue pylibcudf Issues specific to the pylibcudf package labels Jun 6, 2024
literal, _ = self.options
if literal:
return Column(plc.strings.find.contains(column.obj, pattern.obj))
return Column(plc.strings.find.contains(column.obj, pattern.value))
Copy link
Contributor

Choose a reason for hiding this comment

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

for literal contains, can we support columns as patterns? libcudf does: https://docs.rapids.ai/api/libcudf/stable/group__strings__find#ga9acbc587765007c5e35811c07e990b03

Copy link
Contributor Author

Choose a reason for hiding this comment

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

supported this in e45fbed

Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

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

@brandon-b-miller
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 246d017 into rapidsai:branch-24.08 Jun 13, 2024
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cudf.polars Issues specific to cudf.polars feature request New feature or request non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants