viirya commented on a change in pull request #1435:
URL: https://github.com/apache/arrow-rs/pull/1435#discussion_r825516254
##########
File path: arrow/src/array/array_dictionary.rs
##########
@@ -112,7 +112,11 @@ impl<'a, K: ArrowPrimitiveType> DictionaryArray<K> {
_ => data = data.null_count(0),
}
- Ok(data.build()?.into())
+ let array = unsafe { data.build_unchecked() };
+
+ array.validate_dictionary_offest()?;
Review comment:
Actually `validate_full` also contains "cheap" validation (`validate`),
like buffer length, key type, etc. I think they seems necessary still.
--
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]