Add gc
garbage collector support for StringViewArray
and BinaryViewArray
#5513
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.
This is part of the larger project to implement
StringViewArray
-- see #5374In #5481 we added support for
StringViewArray
andByteViewArray
.This ticket tracks adding a
gc
method toStringViewArray
andByteViewArray
After calling
filter
ortake
on aStringViewArray
orByteViewArray
the backing variable length buffer may be much larger than necessary to store the resultsSo before an array may look like the following with significant "garbage" space
After GC it should look like
Describe the solution you'd like
I would like to add a method called
StringViewArray::gc
(andByteViewArray::gc
) that will compactI expect users of the arrow crates to invoke this function, not any of the arrow kernels themselves
Describe alternatives you've considered
We could also add the
gc
functionality as its own standalone kernel (e.g.kernels::gc
) rather than a method on the array.Additional context
This GC is what is described in https://pola.rs/posts/polars-string-type/
The text was updated successfully, but these errors were encountered: