spark icon indicating copy to clipboard operation
spark copied to clipboard

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

Open stevomitric opened this issue 4 months ago • 0 comments

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.

stevomitric avatar Oct 18 '24 14:10 stevomitric