pub enum Value {
Show 17 variants
Null,
Bool(bool),
Byte(i8),
Short(i16),
Integer(i32),
Long(i64),
Float(f32),
Double(f64),
String(String),
Binary(Vec<u8>),
Date(i32),
Timestamp(i64),
Decimal {
value: String,
precision: Option<i32>,
scale: Option<i32>,
},
List(Vec<Value>),
Map(BTreeMap<String, Value>),
Struct(Vec<(String, Value)>),
Variant {
value: Vec<u8>,
metadata: Vec<u8>,
},
}Expand description
A Value in a Row, supporting all Spark SQL types.
Variants§
Null
NULL value
Bool(bool)
Boolean
Byte(i8)
Byte (i8)
Short(i16)
Short (i16)
Integer(i32)
Integer (i32)
Long(i64)
Long (i64)
Float(f32)
Float (f32)
Double(f64)
Double (f64)
String(String)
String
Binary(Vec<u8>)
Binary (bytes)
Date(i32)
Date (days since epoch)
Timestamp(i64)
Timestamp (microseconds since epoch)
Decimal
Decimal (string value with optional precision and scale)
List(Vec<Value>)
Array of values
Map(BTreeMap<String, Value>)
Map of key-value pairs
Struct(Vec<(String, Value)>)
Struct (nested Row)
Variant
A VARIANT value carried as its raw (value, metadata) binary components, matching
pyspark.sql.types.VariantVal(value, metadata). Decoding to JSON/Python is done
lazily on the Python side (VariantVal.toJson/toPython via variant_utils).
Implementations§
Source§impl Value
impl Value
Sourcepub fn as_i64(&self) -> Option<i64>
pub fn as_i64(&self) -> Option<i64>
Get this value as i64, or None if it’s not an integer type.
Sourcepub fn as_str(&self) -> Option<&str>
pub fn as_str(&self) -> Option<&str>
Get this value as a string reference, or None if it’s not a string.
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request