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

[SPARK-50032][SQL] Allow use of fully qualified collation name #48546

Closed

Conversation

stevomitric
Copy link
Contributor

What changes were proposed in this pull request?

In this PR collations can now be identified by their fully qualified name, as per the collation project plan. The Collation expression has been changed to always return fully qualified name. Currently we only support predefined collations.

Why are the changes needed?

Make collation names behave as per the project spec.

Does this PR introduce any user-facing change?

Yes. Two user-facing changes are made:

  1. Collation expression now returns fully qualified name:
select collation('a' collate utf8_lcase) -- returns `SYSTEM.BUILTIN.UTF8_LCASE`
  1. Collations can now be identified by their full qualified name:
select contains('a' collate system.builtin.utf8_lcase, 'A') -- returns true

How was this patch tested?

New tests in this PR.

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

No.

@github-actions github-actions bot added the SQL label Oct 18, 2024
Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

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

@stefankandic @uros-db @srielau Please, have a look at the PR.

@stevomitric stevomitric requested a review from MaxGekk October 30, 2024 17:35
@MaxGekk
Copy link
Member

MaxGekk commented Nov 2, 2024

@stevomitric Please, fix the test failure. It seems it is related:

[info] - collation on non-explicit default collation *** FAILED *** (2 milliseconds)
[info]   Incorrect evaluation (codegen off): SYSTEM.BUILTIN.UTF8_BINARY, actual: SYSTEM.BUILTIN.UTF8_BINARY, expected: UTF8_BINARY (ExpressionEvalHelper.scala:261)
[info]   org.scalatest.exceptions.TestFailedException:

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in faf74ad Dec 1, 2024
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.

7 participants