Skip to content

Conversation

@uros-db
Copy link
Contributor

@uros-db uros-db commented Feb 22, 2024

What changes were proposed in this pull request?

Refactor built-in string functions to support collation for: contains, startsWith, endsWith.

Why are the changes needed?

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

Does this PR introduce any user-facing change?

Yes, users should now be able to use COLLATE within arguments for built-in string functions: CONTAINS, STARTSWITH, ENDSWITH in Spark SQL queries.

How was this patch tested?

Unit tests for:

  • string expressions (StringExpressionsSuite)
  • queries using "collate" (CollationSuite)

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

Yes.

@github-actions github-actions bot added the SQL label Feb 22, 2024
@uros-db uros-db changed the title Collation support for built-in string functions: contains, startswith, endswith [WIP] Collation support for built-in string functions: contains, startswith, endswith Feb 22, 2024
@uros-db uros-db changed the title [WIP] Collation support for built-in string functions: contains, startswith, endswith [SPARK-47131][SQL] Collations - support for built-in string functions: contains, startswith, endswith Feb 22, 2024
@uros-db uros-db changed the title [SPARK-47131][SQL] Collations - support for built-in string functions: contains, startswith, endswith [SPARK-47131][SQL][COLLATION] String function support: contains, startswith, endswith Feb 26, 2024
@uros-db uros-db requested a review from dbatomic February 26, 2024 14:49
@uros-db uros-db requested review from cloud-fan and dbatomic March 1, 2024 10:34
Copy link
Contributor

@dbatomic dbatomic left a comment

Choose a reason for hiding this comment

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

LGTM (plus a couple of minor comments).

@uros-db uros-db requested a review from cloud-fan March 4, 2024 08:14
@cloud-fan
Copy link
Contributor

@uros-db unfortunately it has code conflicts now

@uros-db uros-db requested a review from cloud-fan March 4, 2024 08:34
@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in 479954c Mar 4, 2024
ericm-db pushed a commit to ericm-db/spark that referenced this pull request Mar 5, 2024
…tswith, endswith

### What changes were proposed in this pull request?
Refactor built-in string functions to support collation for: contains, startsWith, endsWith.

### Why are the changes needed?
Add collation support for built-in string functions in Spark.

### Does this PR introduce _any_ user-facing change?
Yes, users should now be able to use COLLATE within arguments for built-in string functions: CONTAINS, STARTSWITH, ENDSWITH in Spark SQL queries.

### How was this patch tested?
Unit tests for:
- string expressions (StringExpressionsSuite)
- queries using "collate" (CollationSuite)

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

Closes apache#45216 from uros-db/string-functions.

Authored-by: Uros Bojanic <157381213+uros-db@users.noreply.github.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants