Rich-T-kid commented on code in PR #10843:
URL: https://github.com/apache/arrow-rs/pull/10843#discussion_r3864085060
##########
arrow-array/src/builder/fixed_size_binary_builder.rs:
##########
@@ -135,6 +135,7 @@ impl FixedSizeBinaryBuilder {
.add_buffer(std::mem::take(&mut self.values_builder).into())
.nulls(self.null_buffer_builder.finish())
.len(array_length);
+ // SAFETY: builder is constructed from fixed-size binary values and
null buffer with lengths guaranteed by the builder
let array_data = unsafe { array_data_builder.build_unchecked() };
FixedSizeBinaryArray::from(array_data)
Review Comment:
this is much cleaner, thanks!
--
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]