viirya commented on code in PR #2317:
URL: https://github.com/apache/arrow-rs/pull/2317#discussion_r938154282
##########
arrow/src/util/integration_util.rs:
##########
@@ -945,22 +1258,25 @@ mod tests {
.len(3)
.add_buffer(value_offsets)
.add_child_data(value_data.into_data())
+ .null_bit_buffer(Some(Buffer::from([0b00000011])))
.build()
.unwrap();
let lists = ListArray::from(list_data);
let structs_int32s = Int32Array::from(vec![None, Some(-2), None]);
let structs_utf8s = StringArray::from(vec![None, None,
Some("aaaaaa")]);
- let structs = StructArray::from(vec![
- (
- Field::new("int32s", DataType::Int32, true),
- Arc::new(structs_int32s) as ArrayRef,
- ),
- (
- Field::new("utf8s", DataType::Utf8, true),
- Arc::new(structs_utf8s) as ArrayRef,
- ),
+ let struct_data_type = DataType::Struct(vec![
+ Field::new("int32s", DataType::Int32, true),
+ Field::new("utf8s", DataType::Utf8, true),
]);
+ let struct_data = ArrayData::builder(struct_data_type)
+ .len(3)
+ .add_child_data(structs_int32s.data().clone())
+ .add_child_data(structs_utf8s.data().clone())
+ .null_bit_buffer(Some(Buffer::from([0b00000011])))
Review Comment:
same as to reflect the validity data in `integration.json`.
--
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]