viirya commented on code in PR #3534:
URL: https://github.com/apache/arrow-rs/pull/3534#discussion_r1071514173
##########
arrow-data/src/transform/mod.rs:
##########
@@ -473,6 +475,20 @@ impl<'a> MutableArrayData<'a> {
})
.collect::<Vec<_>>(),
},
+ DataType::RunEndEncodedType(_, _) => {
+ let run_ends_child = arrays
+ .iter()
+ .map(|array| &array.child_data()[0])
+ .collect::<Vec<_>>();
+ let value_child = arrays
+ .iter()
+ .map(|array| &array.child_data()[1])
+ .collect::<Vec<_>>();
+ vec![
+ MutableArrayData::new(run_ends_child, use_nulls,
array_capacity),
Review Comment:
Run-ends cannot have nulls, but it doesn't mean we just skip it for nulls.
For `MutableArrayData`, we need `use_nulls` to be true in order to call
`extend_nulls` for run-ends to fill the runs of null.
##########
arrow-data/src/data.rs:
##########
@@ -654,6 +654,12 @@ impl ArrayData {
DataType::Dictionary(_, data_type) => {
vec![Self::new_empty(data_type)]
}
+ DataType::RunEndEncodedType(run_ends, values) => {
Review Comment:
Makes sense.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]