Skip to content

[branch-52] fix: handle empty delimiter in split_part (closes #20503) (#20542) - #88

Merged
LiaCastaneda merged 1 commit into
branch-52from
lia/cherry-pick-split-part-fix
Mar 3, 2026
Merged

LiaCastaneda merged 1 commit into
branch-52from
lia/cherry-pick-split-part-fix

Conversation

@LiaCastaneda

Copy link
Copy Markdown

Cherry picks apache#20503 (This made it to the v53 release)

…he#20542)

- Closes apache#20503

`split_part` did not handle empty delimiters in a PostgreSQL-compatible
way (`split("")` in Rust creates leading/trailing empty fields).
This could return unexpected results for positions like `1` / `-1` and
out-of-range values.
This PR aligns behavior with Postgres semantics for empty delimiters.

Small change in how we treat the 1, -1

Indeed!

Yes, behavior is now more consistent with PostgreSQL for
`split_part(str, '', n)`.
No API changes.

(cherry picked from commit 3ab1301)
@LiaCastaneda
LiaCastaneda force-pushed the lia/cherry-pick-split-part-fix branch from a8c0f00 to d904593 Compare March 3, 2026 12:00
@LiaCastaneda
LiaCastaneda marked this pull request as ready for review March 3, 2026 12:03
@LiaCastaneda
LiaCastaneda merged commit 25799f5 into branch-52 Mar 3, 2026
56 checks passed
@gabotechs gabotechs changed the title fix: handle empty delimiter in split_part (closes #20503) (#20542) [branch-52] fix: handle empty delimiter in split_part (closes #20503) (#20542) Apr 16, 2026
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.

3 participants