alamb commented on a change in pull request #1444:
URL: https://github.com/apache/arrow-rs/pull/1444#discussion_r834702308
##########
File path: arrow/src/array/data.rs
##########
@@ -957,12 +955,16 @@ impl ArrayData {
let child = &self.child_data[0];
self.validate_offsets_full::<i64>(child.len + child.offset)?;
}
- DataType::Union(_, _) => {
- // Validate Union Array as part of implementing new Union
semantics
- // See comments in `ArrayData::validate()`
- // https://github.com/apache/arrow-rs/issues/85
- //
- // TODO file follow on ticket for full union validation
+ DataType::Union(_fields, mode) => {
+ match mode {
+ UnionMode::Sparse => {
+ // typeids should all be valid
+
self.validate_offsets_full::<i8>(self.child_data.len())?;
Review comment:
This is an excellent point -- have updated
--
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]