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 java APIs and unit tests #12548

Merged
merged 28 commits into from
Jan 26, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
6d3947d
added regex_program APIs and relevant java classes
cindyyuanjiang Jan 14, 2023
037f7bf
Merge branch 'branch-23.02' into regex-program-cudf
cindyyuanjiang Jan 14, 2023
a164846
Merge branch 'branch-23.02' into regex-program-cudf
cindyyuanjiang Jan 17, 2023
e04f9ea
Merge branch 'branch-23.02' into regex-program-cudf
cindyyuanjiang Jan 17, 2023
722622b
Merge branch 'branch-23.02' into regex-program-cudf
cindyyuanjiang Jan 17, 2023
9c5b19b
fixed code formatting
cindyyuanjiang Jan 18, 2023
a0e3a8b
Merge branch 'regex-program-cudf' of https://github.com/cindyyuanjian…
cindyyuanjiang Jan 18, 2023
a4d3a42
removed getter function from java classes and fixed code formatting
cindyyuanjiang Jan 18, 2023
c36d9ab
Merge branch 'branch-23.02' into regex-program-cudf
cindyyuanjiang Jan 18, 2023
5348acf
changed RegexFlags and CaptureGroups to private constructors
cindyyuanjiang Jan 19, 2023
dc38a80
updated stringSplit and stringSplitRecord APIs
cindyyuanjiang Jan 20, 2023
fa3e52d
updated containsRe and matchesRe apis
cindyyuanjiang Jan 20, 2023
4cff615
updated extractAllRecord API and java unit tests
cindyyuanjiang Jan 20, 2023
d9a0d80
updated extractRe API and tests
cindyyuanjiang Jan 20, 2023
b8dbecf
updated replace_re and replace_with_backrefs APIs
cindyyuanjiang Jan 21, 2023
d0374ad
fixed code formatting
cindyyuanjiang Jan 21, 2023
71ac8de
updated RegexFlags to EnumSet<RegexFlag> and added setter functions f…
cindyyuanjiang Jan 21, 2023
1ad3b06
Merge branch 'branch-23.02' into regex-program-cudf
cindyyuanjiang Jan 21, 2023
6cbbf01
added pattern null check in RegexProgram constructor
cindyyuanjiang Jan 23, 2023
488ce6f
added null checks for regex program
cindyyuanjiang Jan 23, 2023
f64832c
Merge branch 'branch-23.02' into regex-program-cudf
cindyyuanjiang Jan 24, 2023
478b748
Merge branch 'branch-23.02' into regex-program-cudf
cindyyuanjiang Jan 24, 2023
87c8c95
update code formatting
cindyyuanjiang Jan 24, 2023
cab4e03
Merge branch 'regex-program-cudf' of https://github.com/cindyyuanjian…
cindyyuanjiang Jan 24, 2023
46cff5e
Merge branch 'branch-23.02' into regex-program-cudf
cindyyuanjiang Jan 24, 2023
1f9ae3c
removed empty pattern check for stringSplit APIs
cindyyuanjiang Jan 24, 2023
6c8a53e
Merge branch 'regex-program-cudf' of https://github.com/cindyyuanjian…
cindyyuanjiang Jan 24, 2023
2554907
Merge branch 'branch-23.02' into regex-program-cudf
cindyyuanjiang Jan 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions java/src/main/java/ai/rapids/cudf/CaptureGroups.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
*
* Copyright (c) 2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package ai.rapids.cudf;

/**
* Capture groups setting, closely following cudf::strings::capture_groups.
* For processing a regex pattern containing capture groups. These can be used
* to optimize the generated regex instructions where the capture groups do not
* require extracting the groups.
*/
public enum CaptureGroups {
EXTRACT(0), // capture groups processed normally for extract
NON_CAPTURE(1); // convert all capture groups to non-capture groups

final int nativeId; // Native id, for use with libcudf.
CaptureGroups(int nativeId) {
cindyyuanjiang marked this conversation as resolved.
Show resolved Hide resolved
this.nativeId = nativeId;
}
}
Loading