Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor: Clarify docs on UnionBuilder::append_null #1628

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion arrow/src/array/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2064,7 +2064,13 @@ impl UnionBuilder {
}
}

/// Appends a null to this builder.
/// Appends a null to this builder, encoding the null in the array
/// of the `type_name` child / field.
///
/// Since `UnionArray` encodes nulls as an entry in its children
/// (it doesn't have a validity bitmap itself), and where the null
/// is part of the final array, appending a NULL requires
/// specifying which field (child) to use.
#[inline]
pub fn append_null<T: ArrowPrimitiveType>(&mut self, type_name: &str) -> Result<()> {
self.append_option::<T>(type_name, None)
Expand Down