Skip to content

[SPARK-47414][SQL] Lowercase collation support for regexp expressions#46077

Closed
uros-db wants to merge 20 commits into
apache:masterfrom
uros-db:SPARK-47414
Closed

[SPARK-47414][SQL] Lowercase collation support for regexp expressions#46077
uros-db wants to merge 20 commits into
apache:masterfrom
uros-db:SPARK-47414

Conversation

@uros-db

@uros-db uros-db commented Apr 16, 2024

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Introduce collation awareness for regexp expressions: like, ilike, like all, not like all, like any, not like any, rlike, split, regexp_replace, regexp_extract, regexp_extract_all, regexp_count, regexp_substr, regexp_instr. Note: collation support is only enabled for binary (UTF8_BINARY, UNICODE) & lowercase (UTF8_BINARY_LCASE) collation.

Why are the changes needed?

Add collation support for built-in regexp functions in Spark.

Does this PR introduce any user-facing change?

Yes, users should now be able to use collated strings within arguments for built-in regexp functions: like, ilike, like all, not like all, like any, not like any, rlike, split, regexp_replace, regexp_extract, regexp_extract_all, regexp_count, regexp_substr, regexp_instr.

How was this patch tested?

Unit regexp expression tests and e2e sql tests.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions Bot added the SQL label Apr 16, 2024
@uros-db uros-db requested a review from nikolamand-db April 18, 2024 14:14
@uros-db uros-db changed the title [DRAFT][SPARK-47414][SQL] Lowercase collation support for regexp expressions [SPARK-47414][SQL] Lowercase collation support for regexp expressions Apr 19, 2024

@mihailomilosevic2001 mihailomilosevic2001 left a comment

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.

LGTM

@nikolamand-db nikolamand-db left a comment

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.

Minor concerns, otherwise looks good.

@cloud-fan

Copy link
Copy Markdown
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in b4624bf Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants