Skip to main content

Parquet

Struct Parquet 

Source
pub struct Parquet { /* private fields */ }
Expand description

A parquet file kept in a store, answering spans of rows.

let sms = Parquet::at(store, "data/sms")?;
memory.identify("sms", "Parquet");
memory.freeze("sms", Some(sms.version().to_string()));   // and it cost no bytes

Declaring it resolves the name and stops there: a graph that names a dataset has not opened it. And it keeps the digest, not the name, so a dataset rebound mid-run does not change what that run is reading — resolving once is what makes the version true.

Implementations§

Source§

impl Parquet

Source

pub fn at( store: Arc<dyn Store>, name: impl Into<String>, ) -> Result<Self, ParquetError>

The parquet file bound under this name, or why there is none.

One resolve and no bytes: what this costs is what makes stating a version affordable at all.

Source

pub fn version(&self) -> &str

What this dataset is, for the key of everything computed from it: the digest of the content, which the store had already worked out. This is what lets a source be settled without reading itself.

Source

pub fn name(&self) -> &str

The name it was declared under, which is the graph’s word and not the data’s.

Source

pub fn read(&self, span: Span) -> Result<Frame, ParquetError>

The rows that span names. Short is not an error: the last span is whatever is left, and one past the end is a frame with no rows.

Trait Implementations§

Source§

impl Debug for Parquet

Source§

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

Without the bytes, and without the store: what identifies it is the name it was declared under and the content it settled on.

Source§

impl Node for Parquet

Source§

fn forward(&self, input: &Value, _ctx: &Ctx<'_>) -> Result<Value, NodeError>

A span in, a Frame out.

Auto Trait Implementations§

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> Same for T

Source§

type Output = T

Should always be Self
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,