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

Refactor regex builtin character-class identifiers #10814

Merged
merged 3 commits into from
May 11, 2022

Conversation

davidwendt
Copy link
Contributor

Refactors the builtin regex class integer ids to common header for the compiler and executor.
The builtin regex character classes like \s, \d, \W have integer identifiers (bit values that can be combined) but were defined in separate source files. This PR refactors the declarations to the common header file regcomp.h to ensure the same value is used when parsing/compiling the instructions in regcomp.cpp and when evaluating the instructions in regex.inl.

This is just a cleanup of the code and does not effect behavior or performance.

@davidwendt davidwendt added 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. strings strings issues (C++ and Python) improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 9, 2022
@davidwendt davidwendt self-assigned this May 9, 2022
@davidwendt davidwendt requested a review from a team as a code owner May 9, 2022 18:04
@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #10814 (60dcc65) into branch-22.06 (8d861ce) will decrease coverage by 0.10%.
The diff coverage is 96.49%.

@@               Coverage Diff                @@
##           branch-22.06   #10814      +/-   ##
================================================
- Coverage         86.40%   86.30%   -0.11%     
================================================
  Files               143      144       +1     
  Lines             22448    22629     +181     
================================================
+ Hits              19396    19529     +133     
- Misses             3052     3100      +48     
Impacted Files Coverage Δ
python/cudf/cudf/core/frame.py 93.41% <ø> (ø)
python/cudf/cudf/core/indexed_frame.py 91.70% <ø> (ø)
python/cudf/cudf/core/dataframe.py 93.77% <96.29%> (+0.08%) ⬆️
python/cudf/cudf/testing/_utils.py 94.05% <100.00%> (+0.06%) ⬆️
...thon/dask_cudf/dask_cudf/tests/test_distributed.py 18.86% <0.00%> (-67.93%) ⬇️
python/cudf/cudf/io/parquet.py 90.47% <0.00%> (-2.23%) ⬇️
python/dask_cudf/dask_cudf/backends.py 85.51% <0.00%> (-0.94%) ⬇️
python/cudf/cudf/core/column/categorical.py 89.37% <0.00%> (-0.61%) ⬇️
python/cudf/cudf/core/column/decimal.py 90.60% <0.00%> (-0.50%) ⬇️
python/cudf/cudf/core/column/lists.py 91.66% <0.00%> (-0.42%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0fdb6dc...60dcc65. Read the comment docs.

Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

A few small suggestions attached. Otherwise LGTM!

cpp/src/strings/regex/regcomp.h Outdated Show resolved Hide resolved
cpp/src/strings/regex/regcomp.h Outdated Show resolved Hide resolved
cpp/src/strings/regex/regcomp.h Outdated Show resolved Hide resolved
@davidwendt davidwendt requested a review from bdice May 10, 2022 16:43
@davidwendt
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit efd2c39 into rapidsai:branch-22.06 May 11, 2022
@davidwendt davidwendt deleted the regex-refactor-builtins branch May 11, 2022 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change strings strings issues (C++ and Python)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants