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
perf(array): stop flattening appended list views in ListViewBuilder
`append_listview_array` rebuilt every incoming `ListViewArray` into an exact
layout before appending it. Rebasing offsets by the number of elements
already in the builder is correct whatever layout they have, so the rebuild
bought nothing except an unconditional promise that the finished array is
zero-copyable to a `ListArray` - and it cost the caller any sharing the
source expressed.
A constant list array is the case that matters: canonicalizing one already
points every view at a single copy of the value, and flattening it
materialized one copy per row. Appending a 10,000-row constant list of three
elements produced 30,000 elements; it now produces 3.
Keep trimming unreferenced elements, but otherwise append the views as they
arrived and track whether the result is still zero-copyable to a `ListArray`
instead of asserting it. The flag is per-array and consumers already branch
on it, so callers that need an exact layout can rebuild.
Signed-off-by: Claude <noreply@anthropic.com>
Signed-off-by: Robert Kruszewski <robert@spiraldb.com>
0 commit comments