Implement std::fmt::Write
for StringViewBuilder
to permit non contiguous data to be written
#6373
Labels
enhancement
Any new improvement worthy of a entry in the changelog
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
DataFusion has an optimized version of
concat(col1, ...)
forStringView
added by @devanbenz in apache/datafusion#12224 that uses aStringViewArrayBuilder
which is similar but not the same asStringViewBuilder
in arrow: https://github.com/apache/datafusion/blob/9bc39a0522840ed90de2a4d23157de2e192cd00f/datafusion/functions/src/string/common.rs#L464-L536The major differences are:
write
to incrementally build up each string and then callappend_offset
to create each string.StringBuilder
requires each input to be a single contiguous string to callDescribe the solution you'd like
I would like the APIs in arrow-rs to be sufficiently complete that we could use the arrow-rs versions rather than our own custom versions in DataFusion
Describe alternatives you've considered
StringBuilder
allows this likeI think it would be cool to try and follow the same API for
StringViewBuilder
-- though note that API may be more complicated to ensure we don't get any performance regressionsAdditional context
GenericStringBuilder
documentation #6372 for better docs of what StringBuilder doesStringBuilder
#6347 lists more backgroundThe text was updated successfully, but these errors were encountered: