pub struct ColumnIndexBuilder {
null_pages: Vec<bool>,
min_values: Vec<Vec<u8>>,
max_values: Vec<Vec<u8>>,
null_counts: Vec<i64>,
boundary_order: BoundaryOrder,
repetition_level_histograms: Option<Vec<i64>>,
definition_level_histograms: Option<Vec<i64>>,
valid: bool,
}
Expand description
Builder for Parquet ColumnIndex
, part of the Parquet PageIndex
Fields§
§null_pages: Vec<bool>
§min_values: Vec<Vec<u8>>
§max_values: Vec<Vec<u8>>
§null_counts: Vec<i64>
§boundary_order: BoundaryOrder
§repetition_level_histograms: Option<Vec<i64>>
contains the concatenation of the histograms of all pages
definition_level_histograms: Option<Vec<i64>>
contains the concatenation of the histograms of all pages
valid: bool
Is the information in the builder valid?
Set to false
if any entry in the page doesn’t have statistics for
some reason, so statistics for that page won’t be written to the file.
This might happen if the page is entirely null, or
is a floating point column without any non-nan values
e.g. https://github.com/apache/parquet-format/pull/196
Implementations§
Source§impl ColumnIndexBuilder
impl ColumnIndexBuilder
Sourcepub fn append(
&mut self,
null_page: bool,
min_value: Vec<u8>,
max_value: Vec<u8>,
null_count: i64,
)
pub fn append( &mut self, null_page: bool, min_value: Vec<u8>, max_value: Vec<u8>, null_count: i64, )
Append statistics for the next page
Sourcepub fn append_histograms(
&mut self,
repetition_level_histogram: &Option<LevelHistogram>,
definition_level_histogram: &Option<LevelHistogram>,
)
pub fn append_histograms( &mut self, repetition_level_histogram: &Option<LevelHistogram>, definition_level_histogram: &Option<LevelHistogram>, )
Append the given page-level histograms to the ColumnIndex
histograms.
Does nothing if the ColumnIndexBuilder
is not in the valid
state.
Sourcepub fn set_boundary_order(&mut self, boundary_order: BoundaryOrder)
pub fn set_boundary_order(&mut self, boundary_order: BoundaryOrder)
Set the boundary order of the column index
Sourcepub fn to_invalid(&mut self)
pub fn to_invalid(&mut self)
Mark this column index as invalid
Sourcepub fn build_to_thrift(self) -> ColumnIndex
pub fn build_to_thrift(self) -> ColumnIndex
Build and get the thrift metadata of column index
Note: callers should check Self::valid
before calling this method
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ColumnIndexBuilder
impl RefUnwindSafe for ColumnIndexBuilder
impl Send for ColumnIndexBuilder
impl Sync for ColumnIndexBuilder
impl Unpin for ColumnIndexBuilder
impl UnwindSafe for ColumnIndexBuilder
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