pub struct NodeGroup { /* private fields */ }Expand description
A node group holds up to NODE_GROUP_SIZE (131,072) rows,
organized as a collection of ChunkedNodeGroups (each 2,048 rows).
Implementations§
Source§impl NodeGroup
impl NodeGroup
Sourcepub fn new(node_group_idx: NodeGroupIdx, data_types: Vec<LogicalType>) -> Self
pub fn new(node_group_idx: NodeGroupIdx, data_types: Vec<LogicalType>) -> Self
Create a new node group with default capacity (NODE_GROUP_SIZE).
Sourcepub fn with_capacity(
node_group_idx: NodeGroupIdx,
data_types: Vec<LogicalType>,
capacity: u64,
) -> Self
pub fn with_capacity( node_group_idx: NodeGroupIdx, data_types: Vec<LogicalType>, capacity: u64, ) -> Self
Create a node group with a custom capacity.
pub fn node_group_idx(&self) -> NodeGroupIdx
pub fn format(&self) -> NodeGroupFormat
pub fn set_format(&mut self, format: NodeGroupFormat)
pub fn data_types(&self) -> &[LogicalType]
pub fn num_rows(&self) -> u64
pub fn capacity(&self) -> u64
pub fn is_full(&self) -> bool
pub fn num_chunked_groups(&self) -> usize
pub fn chunked_group(&self, idx: usize) -> &ChunkedNodeGroup
pub fn chunked_group_mut(&mut self, idx: usize) -> &mut ChunkedNodeGroup
Sourcepub fn global_row_to_chunked_group(&self, row: u64) -> (usize, u64)
pub fn global_row_to_chunked_group(&self, row: u64) -> (usize, u64)
Map a global row index to (chunked_group_idx, local_row_within_group).
Sourcepub fn append_row(&mut self, values: &[Option<&[u8]>]) -> u64
pub fn append_row(&mut self, values: &[Option<&[u8]>]) -> u64
Append a row of raw byte values across all columns. Automatically creates new ChunkedNodeGroups as needed. Returns the global row index within the node group.
Auto Trait Implementations§
impl Freeze for NodeGroup
impl RefUnwindSafe for NodeGroup
impl Send for NodeGroup
impl Sync for NodeGroup
impl Unpin for NodeGroup
impl UnsafeUnpin for NodeGroup
impl UnwindSafe for NodeGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.