Skip to content

Commit

Permalink
Add append_nulls to dictionary builders (#6542)
Browse files Browse the repository at this point in the history
* Add append_nulls to dictionary builders

* Update arrow-array/src/builder/generic_bytes_dictionary_builder.rs

Co-authored-by: Kyle Barron <[email protected]>

---------

Co-authored-by: Kyle Barron <[email protected]>
  • Loading branch information
adriangb and kylebarron authored Oct 11, 2024
1 parent 4adbeee commit 021c216
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arrow-array/src/builder/generic_bytes_dictionary_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ where
self.keys_builder.append_null()
}

/// Infallibly append `n` null slots into the builder
#[inline]
pub fn append_nulls(&mut self, n: usize) {
self.keys_builder.append_nulls(n)
}

/// Append an `Option` value into the builder
///
/// # Panics
Expand Down
6 changes: 6 additions & 0 deletions arrow-array/src/builder/primitive_dictionary_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ where
self.keys_builder.append_null()
}

/// Append `n` null slots into the builder
#[inline]
pub fn append_nulls(&mut self, n: usize) {
self.keys_builder.append_nulls(n)
}

/// Append an `Option` value into the builder
///
/// # Panics
Expand Down

0 comments on commit 021c216

Please sign in to comment.