Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Use extend_constant for validity initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
VasanthakumarV committed Sep 17, 2021
1 parent cd4e3d4 commit 2d1aa11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/array/utf8/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ impl<O: Offset> MutableUtf8Array<O> {
I: Iterator<Item = Option<P>>,
{
if self.validity.is_none() {
self.validity = Some(MutableBitmap::from_trusted_len_iter(
std::iter::repeat(true).take(self.len()),
));
let mut validity = MutableBitmap::new();
validity.extend_constant(self.len(), true);
self.validity = Some(validity);
}

extend_from_trusted_len_iter(
Expand Down

0 comments on commit 2d1aa11

Please sign in to comment.