Skip to content

fix: handle Utf8View and LargeUtf8 separators in concat_ws#20361

Open
neilconway wants to merge 1 commit intoapache:mainfrom
neilconway:neilc/concat-ws-string-types
Open

fix: handle Utf8View and LargeUtf8 separators in concat_ws#20361
neilconway wants to merge 1 commit intoapache:mainfrom
neilconway:neilc/concat-ws-string-types

Conversation

@neilconway
Copy link
Contributor

@neilconway neilconway commented Feb 15, 2026

Which issue does this PR close?

Rationale for this change

concat_ws only handled Utf8 separators (despite its signature claiming otherwise). Attempting to pass a Utf8View or LargeUtf8 separator would result in a panic or internal error.

What changes are included in this PR?

  • Add SLT test case for array Utf8View separator
  • Add unit test for scalar Utf8View separator
  • Fix behavior: add support for LargeUtf8 and Utf8View separators, both array and scalar
  • Other minor code cleanups and improvements

Are these changes tested?

Yes. Added new test cases.

Note that we can't easily test the scalar separator case via SQL, because simplify_concat_ws casts constant/scalar separators to Utf8. That behavior is dubious and IMO should be changed, but I'll tackle that in a subsequent PR.

Are there any user-facing changes?

No, aside from a previously failing query now succeeding.

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Feb 15, 2026
@neilconway neilconway force-pushed the neilc/concat-ws-string-types branch from c9d3bcf to b68b354 Compare February 15, 2026 02:41
concat_ws only handled Utf8 separators; attempting to pass a Utf8View or
LargeUtf8 separator would result in a panic or internal error.
@neilconway neilconway force-pushed the neilc/concat-ws-string-types branch from b68b354 to f7df9a0 Compare February 15, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

concat_ws() fails with Utf8View, LargeUtf8 separators

2 participants