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

[CBRD-24563] [p11_2] Add RE2 regexp library as a backend for regular expression functions #4057

Merged
merged 7 commits into from
Jan 17, 2023

Conversation

hgryoo
Copy link
Member

@hgryoo hgryoo commented Jan 17, 2023

http://jira.cubrid.org/browse/CBRD-24563

Implementation

Move c++ implementation to string_regex_std.cpp
Implement RE2 implementation in string_regex_re2.cpp
Implement a common routine of regexp functions in string_regex.cpp
C++ uses UTF-16 (wide string). But RE2 only supports UTF-8. Converting to UTF-8 to perform correctly for RE2 is required
Implement functions that convert from/to string represented with a codeset (any codeset <-> utf-8)
Refactor functions that convert from/to wstring. In C++ utf-8 string <-> wstring are supported. So the above functions are used in the functions.
For RE2, Implement a function to split a string by position considering utf-8 codeset: re2_split_string ()
For RE2, Implement a function to get a distance between two positions in a string considering utf-8 codeset: re2_distance_utf8 ()
Add a system parameter (regexp_engine) to choose the regexp backend library.
CUBRID#4033)

http://jira.cubrid.org/browse/CBRD-24563

PRM_KEYWORD is a better approach to validate the parameter value.
I've changed regexp_engine to PRM_KEYWORD type and set lower and upper values.
@hgryoo hgryoo self-assigned this Jan 17, 2023
@mhoh3963 mhoh3963 merged commit 40061f4 into CUBRID:release/11.2 Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants