You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cleanup / overhaul StringViewArrayBuilder and related types #21684
Is your feature request related to a problem or challenge?
StringViewArrayBuilder / StringArrayBuilder / LargeStringArrayBuilder has a fairly special-purpose API; it is basically only well-suited to use by concat and concat_ws, which is indeed the only place that uses it today. That makes it particularly odd that it is pub, not pub(crate).
In addition, there are a bunch of places where we use Arrow's StringBuilder / StringViewBuilder that would benefit from a better API: by passing the NULL bitmap to finish(), we can avoid the overhead of constructing the NULL bitmap iteratively.
Describe the solution you'd like
Rename StringViewArrayBuilder -> ConcatStringViewBuilder, and so on for the other two functions.
Make the Concat[...]Builder types pub(crate)
Add a new family of specialized builders (StringArrayBuilder, LargeStringArrayBuilder, StringViewArrayBuilder), with an API like with_capacity, append_value(&str), append_placeholder(), finish(Option<NullBuffer>). This should be pub(crate).
Switch most of the places where we use Arrow's StringBuilder to use one of the new bulk-NULL builders. This should cover call-sites like initcap, reverse, translate, substrindex, replace, lpad/rpad, repeat, min_max_bytes, first_last/state, concat_elements_utf8view, lower, and upper.
Activity
chore: Rename concat-specific string builders, make pub(crate) (apach…
perf: Add bulk NULL-aware string builders, use in `lower` and `upper` (…
neilconway commentedon Apr 27, 2026
This was fixed in #21789 and #21695