pub struct TypedValueScalar { /* private fields */ }
Expand description
Represents an Arrow scalar with a TypedValueEncoding.
Implementations§
Source§impl TypedValueScalar
impl TypedValueScalar
Sourcepub fn try_new(value: ScalarValue) -> Result<TypedValueScalar, DataFusionError>
pub fn try_new(value: ScalarValue) -> Result<TypedValueScalar, DataFusionError>
Tries to create a new TypedValueScalar from a regular ScalarValue.
§Errors
Returns an error if the data type of value
is unexpected.
Sourcepub fn new_unchecked(inner: ScalarValue) -> TypedValueScalar
pub fn new_unchecked(inner: ScalarValue) -> TypedValueScalar
Creates a new TypedValueScalar without checking invariants.
Trait Implementations§
Source§impl Clone for TypedValueScalar
impl Clone for TypedValueScalar
Source§fn clone(&self) -> TypedValueScalar
fn clone(&self) -> TypedValueScalar
Returns a duplicate 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 EncodingScalar for TypedValueScalar
impl EncodingScalar for TypedValueScalar
Source§type Encoding = TypedValueEncoding
type Encoding = TypedValueEncoding
The encoding used by this scalar.
Source§fn encoding(&self) -> &<TypedValueScalar as EncodingScalar>::Encoding
fn encoding(&self) -> &<TypedValueScalar as EncodingScalar>::Encoding
Obtains the encoding instance for this scalar.
Source§fn scalar_value(&self) -> &ScalarValue
fn scalar_value(&self) -> &ScalarValue
Returns a reference to the inner scalar value.
Source§fn into_scalar_value(self) -> ScalarValue
fn into_scalar_value(self) -> ScalarValue
Consumes
self
and returns the inner scalar value.Source§fn to_array(
&self,
number_of_rows: usize,
) -> Result<<Self::Encoding as TermEncoding>::Array, DataFusionError>
fn to_array( &self, number_of_rows: usize, ) -> Result<<Self::Encoding as TermEncoding>::Array, DataFusionError>
Produces a new array with
number_of_rows
.Source§impl TryFrom<ScalarValue> for TypedValueScalar
impl TryFrom<ScalarValue> for TypedValueScalar
Source§type Error = DataFusionError
type Error = DataFusionError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ScalarValue,
) -> Result<TypedValueScalar, <TypedValueScalar as TryFrom<ScalarValue>>::Error>
fn try_from( value: ScalarValue, ) -> Result<TypedValueScalar, <TypedValueScalar as TryFrom<ScalarValue>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for TypedValueScalar
impl !RefUnwindSafe for TypedValueScalar
impl Send for TypedValueScalar
impl Sync for TypedValueScalar
impl Unpin for TypedValueScalar
impl !UnwindSafe for TypedValueScalar
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§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