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
Extract shared list-array construction from the split_* functions in split.rs #6983
In native/spark-expr/src/string_funcs/split.rs, the four generic split functions end with the same block of code: finish the values builder, pick Utf8/LargeUtf8 from O::IS_LARGE, build the item field, and construct a GenericListArray with the offsets.
They differ only in the per-row call and in how the null buffer is produced (cloned input nulls vs NullBufferBuilder). A fix to the list construction, such as the item field's nullability, has to be made in four places.
Describe the potential solution
Extract fn finish_split_list<O: OffsetSizeTrait>(offsets: Vec<O>, values: GenericStringBuilder<O>, nulls: Option<NullBuffer>) -> ColumnarValue and call it from all four functions. Optionally, also factor the per-row loop into a generic driver so each variant only supplies its null predicate and push call.
Additional context
This is small and a good first issue. Line references are pinned to commit 7d8d9b1.
Activity