enum LevelInfoBuilder {
Primitive(ArrayLevels),
List(Box<LevelInfoBuilder>, LevelContext, OffsetBuffer<i32>, Option<NullBuffer>),
LargeList(Box<LevelInfoBuilder>, LevelContext, OffsetBuffer<i64>, Option<NullBuffer>),
FixedSizeList(Box<LevelInfoBuilder>, LevelContext, usize, Option<NullBuffer>),
Struct(Vec<LevelInfoBuilder>, LevelContext, Option<NullBuffer>),
}
Expand description
A helper to construct ArrayLevels
from a potentially nested [Field
]
Variants§
Primitive(ArrayLevels)
A primitive, leaf array
List(Box<LevelInfoBuilder>, LevelContext, OffsetBuffer<i32>, Option<NullBuffer>)
A list array
LargeList(Box<LevelInfoBuilder>, LevelContext, OffsetBuffer<i64>, Option<NullBuffer>)
A large list array
FixedSizeList(Box<LevelInfoBuilder>, LevelContext, usize, Option<NullBuffer>)
A fixed size list array
Struct(Vec<LevelInfoBuilder>, LevelContext, Option<NullBuffer>)
A struct array
Implementations§
Source§impl LevelInfoBuilder
impl LevelInfoBuilder
Sourcefn try_new(
field: &Field,
parent_ctx: LevelContext,
array: &ArrayRef,
) -> Result<Self>
fn try_new( field: &Field, parent_ctx: LevelContext, array: &ArrayRef, ) -> Result<Self>
Create a new LevelInfoBuilder
for the given [Field
] and parent LevelContext
Sourcefn finish(self) -> Vec<ArrayLevels>
fn finish(self) -> Vec<ArrayLevels>
Finish this LevelInfoBuilder
returning the ArrayLevels
for the leaf columns
as enumerated by a depth-first search
Sourcefn write(&mut self, range: Range<usize>)
fn write(&mut self, range: Range<usize>)
Given an array
, write the level data for the elements in range
Sourcefn write_list<O: OffsetSizeTrait>(
child: &mut LevelInfoBuilder,
ctx: &LevelContext,
offsets: &[O],
nulls: Option<&NullBuffer>,
range: Range<usize>,
)
fn write_list<O: OffsetSizeTrait>( child: &mut LevelInfoBuilder, ctx: &LevelContext, offsets: &[O], nulls: Option<&NullBuffer>, range: Range<usize>, )
Write range
elements from ListArray array
Note: MapArrays are ListArray<i32>
under the hood and so are dispatched to this method
Sourcefn write_struct(
children: &mut [LevelInfoBuilder],
ctx: &LevelContext,
nulls: Option<&NullBuffer>,
range: Range<usize>,
)
fn write_struct( children: &mut [LevelInfoBuilder], ctx: &LevelContext, nulls: Option<&NullBuffer>, range: Range<usize>, )
Write range
elements from StructArray array
Sourcefn write_fixed_size_list(
child: &mut LevelInfoBuilder,
ctx: &LevelContext,
fixed_size: usize,
nulls: Option<&NullBuffer>,
range: Range<usize>,
)
fn write_fixed_size_list( child: &mut LevelInfoBuilder, ctx: &LevelContext, fixed_size: usize, nulls: Option<&NullBuffer>, range: Range<usize>, )
Write range
elements from FixedSizeListArray with child data values
and null bitmap nulls
.
Sourcefn write_leaf(info: &mut ArrayLevels, range: Range<usize>)
fn write_leaf(info: &mut ArrayLevels, range: Range<usize>)
Write a primitive array, as defined by is_leaf
Sourcefn visit_leaves(&mut self, visit: impl Fn(&mut ArrayLevels) + Copy)
fn visit_leaves(&mut self, visit: impl Fn(&mut ArrayLevels) + Copy)
Visits all children of this node in depth first order
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LevelInfoBuilder
impl !RefUnwindSafe for LevelInfoBuilder
impl Send for LevelInfoBuilder
impl Sync for LevelInfoBuilder
impl Unpin for LevelInfoBuilder
impl !UnwindSafe for LevelInfoBuilder
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
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>
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>
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 more