pub struct DatasetState {
pub schema: DatasetSchema,
pub data: Vec<RecordBatch>,
pub arrow_schema: Arc<Schema>,
pub index: HashMap<String, HashMap<String, Vec<u32>, RandomState>, RandomState>,
pub lazy: bool,
}Expand description
Per-dataset state: schema metadata, the resident chunks, and the
equality index built per the dataset’s [dataset.index] policy.
data is the dataset as a Vec<RecordBatch> — exactly the chunks
produced by the underlying reader, after temporal columns are cast to
Utf8. We deliberately do not call concat_batches to fuse them
into one batch: on wide schemas (hundreds of columns) that transiently
allocates a second full copy of the decoded Arrow data, pushing peak
RSS to ~2× the resident size and OOM-killing the process at startup.
When lazy is true the dataset is not materialised: data is empty,
index is empty, and every query is dispatched to DataFusion SQL
against a registered ListingTable. arrow_schema still carries the
inferred schema so discovery endpoints work.
Fields§
§schema: DatasetSchema§data: Vec<RecordBatch>§arrow_schema: Arc<Schema>§index: HashMap<String, HashMap<String, Vec<u32>, RandomState>, RandomState>§lazy: boolImplementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DatasetState
impl !UnwindSafe for DatasetState
impl Freeze for DatasetState
impl Send for DatasetState
impl Sync for DatasetState
impl Unpin for DatasetState
impl UnsafeUnpin for DatasetState
Blanket Implementations§
Source§impl<T> AsAny for T
impl<T> AsAny for T
Source§fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
dyn Any reference to the object: Read moreSource§fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ
fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ
Arc<dyn Any> reference to the object: Read moreSource§fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
Box<dyn Any>: Read moreSource§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
std::any::type_name, since Any does not provide it and
Any::type_id is useless as a debugging aid (its Debug is just a mess of hex digits).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> 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>
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