pub enum Value {
Show 17 variants Boolean(bool), Int(i32), LongInt(i64), Float(f32), Double(f64), Date(i32), Time(i64), Timestamp(i64), TimestampTZ(i64), String(String), UUID(i128), Fixed(usize, Vec<u8>), Binary(Vec<u8>), Decimal(Decimal), Struct(Struct), List(Vec<Option<Value>>), Map(HashMap<String, Option<Value>>),
}
Expand description

Values present in iceberg type

Variants§

§

Boolean(bool)

0x00 for false, non-zero byte for true

§

Int(i32)

Stored as 4-byte little-endian

§

LongInt(i64)

Stored as 8-byte little-endian

§

Float(f32)

Stored as 4-byte little-endian

§

Double(f64)

Stored as 8-byte little-endian

§

Date(i32)

Stores days from the 1970-01-01 in an 4-byte little-endian int

§

Time(i64)

Stores microseconds from midnight in an 8-byte little-endian long

§

Timestamp(i64)

Stores microseconds from 1970-01-01 00:00:00.000000 in an 8-byte little-endian long

§

TimestampTZ(i64)

Stores microseconds from 1970-01-01 00:00:00.000000 in an 8-byte little-endian long

§

String(String)

UTF-8 bytes (without length)

§

UUID(i128)

16-byte big-endian value

§

Fixed(usize, Vec<u8>)

Binary value

§

Binary(Vec<u8>)

Binary value (without length)

§

Decimal(Decimal)

Stores unscaled value as two’s-complement big-endian binary, using the minimum number of bytes for the value

§

Struct(Struct)

A struct is a tuple of typed values. Each field in the tuple is named and has an integer id that is unique in the table schema. Each field can be either optional or required, meaning that values can (or cannot) be null. Fields may be any type. Fields may have an optional comment or doc string. Fields can have default values.

§

List(Vec<Option<Value>>)

A list is a collection of values with some element type. The element field has an integer id that is unique in the table schema. Elements can be either optional or required. Element types may be any type.

§

Map(HashMap<String, Option<Value>>)

A map is a collection of key-value pairs with a key type and a value type. Both the key field and value field each have an integer id that is unique in the table schema. Map keys are required and map values can be either optional or required. Both map keys and map values may be any type, including nested types.

Implementations§

source§

impl Value

source

pub fn tranform(&self, transform: &Transform) -> Result<Value>

Perform a partition transformation for the given value

Trait Implementations§

source§

impl Clone for Value

source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Value

source§

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

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Value

source§

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 Into<ByteBuf> for Value

source§

fn into(self) -> ByteBuf

Converts this type into the (usually inferred) input type.
source§

impl PartialEq<Value> for Value

source§

fn eq(&self, other: &Value) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Value

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for Value

Auto Trait Implementations§

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · 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<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<T> Allocation for Twhere T: RefUnwindSafe + Send + Sync,

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,