InMemoryRowGroup

Struct InMemoryRowGroup 

Source
pub(crate) struct InMemoryRowGroup<'a> {
    pub(crate) offset_index: Option<&'a [OffsetIndexMetaData]>,
    pub(crate) column_chunks: Vec<Option<Arc<ColumnChunkData>>>,
    pub(crate) row_count: usize,
    pub(crate) row_group_idx: usize,
    pub(crate) metadata: &'a ParquetMetaData,
}
Expand description

An in-memory collection of column chunks

Fields§

§offset_index: Option<&'a [OffsetIndexMetaData]>§column_chunks: Vec<Option<Arc<ColumnChunkData>>>

Column chunks for this row group

§row_count: usize§row_group_idx: usize§metadata: &'a ParquetMetaData

Implementations§

Source§

impl InMemoryRowGroup<'_>

Source

pub(crate) async fn fetch<T: AsyncFileReader + Send>( &mut self, input: &mut T, projection: &ProjectionMask, selection: Option<&RowSelection>, batch_size: usize, cache_mask: Option<&ProjectionMask>, ) -> Result<()>

Fetches any additional column data specified in projection that is not already present in self.column_chunks.

If selection is provided, only the pages required for the selection are fetched. Otherwise, all pages are fetched.

Source§

impl InMemoryRowGroup<'_>

Source

pub(crate) fn fetch_ranges( &self, projection: &ProjectionMask, selection: Option<&RowSelection>, batch_size: usize, cache_mask: Option<&ProjectionMask>, ) -> FetchRanges

Returns the byte ranges to fetch for the columns specified in projection and selection.

cache_mask indicates which columns, if any, are being cached by RowGroupCache. The selection for Cached columns is expanded to batch boundaries to simplify accounting for what data is cached.

Source

pub(crate) fn fill_column_chunks<I>( &mut self, projection: &ProjectionMask, page_start_offsets: Option<Vec<Vec<u64>>>, chunk_data: I, )
where I: IntoIterator<Item = Bytes>,

Fills in self.column_chunks with the data fetched from chunk_data.

This function must be called with the data from the ranges returned by fetch_ranges and the corresponding page_start_offsets, with the exact same and selection.

Trait Implementations§

Source§

impl<'a> Debug for InMemoryRowGroup<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl RowGroups for InMemoryRowGroup<'_>

Source§

fn column_chunks(&self, i: usize) -> Result<Box<dyn PageIterator>>

Return chunks for column i

Source§

fn num_rows(&self) -> usize

Get the number of rows in this collection

Auto Trait Implementations§

§

impl<'a> Freeze for InMemoryRowGroup<'a>

§

impl<'a> !RefUnwindSafe for InMemoryRowGroup<'a>

§

impl<'a> Send for InMemoryRowGroup<'a>

§

impl<'a> Sync for InMemoryRowGroup<'a>

§

impl<'a> Unpin for InMemoryRowGroup<'a>

§

impl<'a> !UnwindSafe for InMemoryRowGroup<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> Ungil for T
where T: Send,