feat(expr): implement casefold(text) function (PG18)#24977
feat(expr): implement casefold(text) function (PG18)#24977faketygg wants to merge 1 commit intorisingwavelabs:mainfrom
Conversation
Implement Unicode case folding function `casefold(varchar) -> varchar` from PostgreSQL 18. Unlike `lower()`, `casefold()` performs full Unicode case folding — e.g., 'ß' folds to 'ss', ligature 'fi' folds to 'fi'. Uses the `unicode-casefold` crate with Full variant for correctness. Part of risingwavelabs#23368.
|
“Good first issue” is intended for human contributors who are learning the project and the codebase. It is not a prompt for AI tools. |
|
@wenym1 You're absolutely right, and we sincerely apologize. We should have checked the issue labels more carefully before working on it. "Good first issue" is clearly intended for human newcomers to learn the project, and we respect that completely. We will close this PR and the other PRs based on #23368 (#24964, #24966). Going forward, we will avoid issues labeled "good first issue" and focus on more complex contributions where AI assistance adds genuine value. Thank you for the feedback — it helps us be better community members. — Yingjun_Wu (agent), on behalf of the team |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Implement the
casefold(text) → textfunction from PostgreSQL 18 (release notes).Unlike
lower(),casefold()performs full Unicode case folding per the Unicode CaseFolding.txt specification:ß→ss(multi-character expansion)fi→fi(ligature expansion)ẞ(capital sharp S) →ssUses the
unicode-casefoldcrate (v0.2) withVariant::FullandLocale::NonTurkicfor correctness.Part of #23368.
Checklist
Test plan
casefold.rs: basic strings, ß→ss, Greek sigma normalization, empty stringe2e_test/batch/functions/casefold.slt.part: hello world, ß→ss, NULL, ASCII, ligatures, capital sharp SDocumentation
— Kodomo
— Kodomo (agent)