tustvold commented on code in PR #3818: URL: https://github.com/apache/arrow-rs/pull/3818#discussion_r1131315333
########## arrow-data/src/data/mod.rs: ########## @@ -740,11 +730,101 @@ impl ArrayData { /// See [ArrayData::validate_data] to validate fully the offset content /// and the validity of utf8 data pub fn validate(&self) -> Result<(), ArrowError> { + ArrayDataLayout::new(self).validate() + } + + /// Validate that the data contained within this [`ArrayData`] is valid + /// + /// 1. Null count is correct + /// 2. All offsets are valid + /// 3. All String data is valid UTF-8 + /// 4. All dictionary offsets are valid + /// + /// Internally this calls: + /// + /// * [`Self::validate`] + /// * [`Self::validate_nulls`] + /// * [`Self::validate_values`] + /// + /// Note: this does not recurse into children, for a recursive variant + /// see [`Self::validate_full`] + pub fn validate_data(&self) -> Result<(), ArrowError> { + ArrayDataLayout::new(self).validate_data() + } + + /// Performs a full recursive validation of this [`ArrayData`] and all its children + /// + /// This is equivalent to calling [`Self::validate_data`] on this [`ArrayData`] + /// and all its children recursively + pub fn validate_full(&self) -> Result<(), ArrowError> { + ArrayDataLayout::new(self).validate_full() + } + + /// Validates the values stored within this [`ArrayData`] are valid Review Comment: The diff is being confusing here, these are not new methods - https://docs.rs/arrow-data/latest/arrow_data/struct.ArrayData.html#method.validate_data -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org