Skip to content

split_part function returning wrong results #20503

@LiaCastaneda

Description

@LiaCastaneda

Describe the bug

split_part('a,b', '', 2) is returning 'a', but it should return "" (PostgreSQL - https://www.db-fiddle.com/f/bndEpNtUKEnLoe3oQE1gtY/0). It seems to be related to how the split(...) function works in Rust.

Rust playground repro

Another instance of this bug is the following query:

SELECT split_part('a,b', '', 1)

returning "" instead of a,b

To Reproduce

DF fiddle link

Expected behavior

return ""

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions