pub struct OwnedTable<S: Scalar> { /* private fields */ }
Expand description
A table of data, with schema included. This is simply a map from Identifier
to OwnedColumn
,
where columns order matters.
This is primarily used as an internal result that is used before
converting to the final result in either Arrow format or JSON.
This is the analog of an arrow RecordBatch
.
Implementations§
Source§impl<S: Scalar> OwnedTable<S>
impl<S: Scalar> OwnedTable<S>
Sourcepub fn try_new(
table: IndexMap<Identifier, OwnedColumn<S>, BuildHasherDefault<AHasher>>,
) -> Result<Self, OwnedTableError>
pub fn try_new( table: IndexMap<Identifier, OwnedColumn<S>, BuildHasherDefault<AHasher>>, ) -> Result<Self, OwnedTableError>
Creates a new OwnedTable
.
Sourcepub fn try_from_iter<T: IntoIterator<Item = (Identifier, OwnedColumn<S>)>>(
iter: T,
) -> Result<Self, OwnedTableError>
pub fn try_from_iter<T: IntoIterator<Item = (Identifier, OwnedColumn<S>)>>( iter: T, ) -> Result<Self, OwnedTableError>
Creates a new OwnedTable
.
Sourcepub fn num_columns(&self) -> usize
pub fn num_columns(&self) -> usize
Number of columns in the table.
Sourcepub fn into_inner(
self,
) -> IndexMap<Identifier, OwnedColumn<S>, BuildHasherDefault<AHasher>>
pub fn into_inner( self, ) -> IndexMap<Identifier, OwnedColumn<S>, BuildHasherDefault<AHasher>>
Returns the columns of this table as an IndexMap
Sourcepub fn inner_table(
&self,
) -> &IndexMap<Identifier, OwnedColumn<S>, BuildHasherDefault<AHasher>>
pub fn inner_table( &self, ) -> &IndexMap<Identifier, OwnedColumn<S>, BuildHasherDefault<AHasher>>
Returns the columns of this table as an IndexMap
Sourcepub fn column_names(&self) -> impl Iterator<Item = &Identifier>
pub fn column_names(&self) -> impl Iterator<Item = &Identifier>
Returns the columns of this table as an Iterator
Source§impl<S: Scalar> OwnedTable<S>
impl<S: Scalar> OwnedTable<S>
Sourcepub fn evaluate(
&self,
expr: &Expression,
) -> ExpressionEvaluationResult<OwnedColumn<S>>
pub fn evaluate( &self, expr: &Expression, ) -> ExpressionEvaluationResult<OwnedColumn<S>>
Evaluate an expression on the table.
Trait Implementations§
Source§impl<S: Clone + Scalar> Clone for OwnedTable<S>
impl<S: Clone + Scalar> Clone for OwnedTable<S>
Source§fn clone(&self) -> OwnedTable<S>
fn clone(&self) -> OwnedTable<S>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de, S> Deserialize<'de> for OwnedTable<S>where
S: Deserialize<'de> + Scalar,
impl<'de, S> Deserialize<'de> for OwnedTable<S>where
S: Deserialize<'de> + Scalar,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<S: Scalar> PartialEq for OwnedTable<S>
impl<S: Scalar> PartialEq for OwnedTable<S>
Source§impl<S> Serialize for OwnedTable<S>
impl<S> Serialize for OwnedTable<S>
Source§impl<S: Scalar> TryFrom<OwnedTable<S>> for RecordBatch
impl<S: Scalar> TryFrom<OwnedTable<S>> for RecordBatch
Source§type Error = ArrowError
type Error = ArrowError
The type returned in the event of a conversion error.
Source§impl<S: Scalar> TryFrom<RecordBatch> for OwnedTable<S>
impl<S: Scalar> TryFrom<RecordBatch> for OwnedTable<S>
Source§type Error = OwnedArrowConversionError
type Error = OwnedArrowConversionError
The type returned in the event of a conversion error.
impl<S: Eq + Scalar> Eq for OwnedTable<S>
Auto Trait Implementations§
impl<S> Freeze for OwnedTable<S>
impl<S> RefUnwindSafe for OwnedTable<S>where
S: RefUnwindSafe,
impl<S> Send for OwnedTable<S>
impl<S> Sync for OwnedTable<S>
impl<S> Unpin for OwnedTable<S>where
S: Unpin,
impl<S> UnwindSafe for OwnedTable<S>where
S: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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>
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 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>
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