pub enum Transform {
Identity,
Bucket(u32),
Truncate(u32),
Year,
Month,
Day,
Hour,
Void,
}
Expand description
A Transform that is applied to each source column to produce a partition value.
Variants§
Identity
Source value, unmodified
Bucket(u32)
Hash of value, mod N
Truncate(u32)
Value truncated to width
Year
Extract a date or timestamp year as years from 1970
Month
Extract a date or timestamp month as months from 1970-01-01
Day
Extract a date or timestamp day as days from 1970-01-01
Hour
Extract a date or timestamp hour as hours from 1970-01-01 00:00:00
Void
Always produces null
Implementations§
Source§impl<'de> Transform
impl<'de> Transform
pub fn deserialize<__D>(__deserializer: __D) -> Result<Transform, __D::Error>where
__D: Deserializer<'de>,
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Transform
impl<'de> Deserialize<'de> for Transform
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
impl Eq for Transform
impl StructuralPartialEq for Transform
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
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