Skip to content

PHOENIX-7276 Add REGEXP_LIKE built-in function#2398

Open
xavifeds8 wants to merge 3 commits intoapache:masterfrom
xavifeds8:PHOENIX-7276
Open

PHOENIX-7276 Add REGEXP_LIKE built-in function#2398
xavifeds8 wants to merge 3 commits intoapache:masterfrom
xavifeds8:PHOENIX-7276

Conversation

@xavifeds8
Copy link
Copy Markdown

Adds REGEXP_LIKE(source_string, pattern [, match_parameter]) function that tests whether a string matches a regular expression pattern and returns a boolean result. Uses full-match semantics consistent with Hive/Spark.

@xavifeds8
Copy link
Copy Markdown
Author

Adds REGEXP_LIKE(source_string, pattern [, match_parameter]) function that
tests whether a string matches a regular expression pattern and returns a
boolean result. Uses full-match semantics consistent with Hive/Spark.
@xavifeds8 xavifeds8 force-pushed the PHOENIX-7276 branch 2 times, most recently from 22cc7dd to b20485e Compare April 2, 2026 07:26
…rtline 1) EOF reached before encapsulated token finished"
@xavifeds8
Copy link
Copy Markdown
Author

@virajjasani can you please review this PR ?

@virajjasani virajjasani self-requested a review April 13, 2026 22:15
@virajjasani
Copy link
Copy Markdown
Contributor

Nice, can we also document what is the main difference b/ this function and LIKE expression that phoenix supports?

Comment on lines +38 to +52
* Function similar to Oracle's REGEXP_LIKE, which tests whether a string matches a regular
* expression pattern. Usage: {@code REGEXP_LIKE(<source_char>, <pattern> [, <match_parameter>]) }
* <p>
* source_char is the string to search. pattern is a Java compatible regular expression string.
* match_parameter is an optional string of flags that modify matching behavior:
* <ul>
* <li>'i' - case-insensitive matching</li>
* <li>'c' - case-sensitive matching (default)</li>
* <li>'m' - multiline mode (^ and $ match line boundaries). Note: with full-match semantics, 'm'
* has limited use on its own; it is most useful combined with 's'. May become independently useful
* if partial-match semantics are adopted in the future.</li>
* <li>'s' - dotall mode (. matches any character including newline)</li>
* </ul>
* The function returns a {@link org.apache.phoenix.schema.types.PBoolean}.
* @since 5.3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please feel free to include the difference as part of this Javadoc

@virajjasani
Copy link
Copy Markdown
Contributor

Triggered a new build since the last build timed out https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-2398/

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.

2 participants