Enum SqlFunction
pub enum SqlFunction {
Binary(SqlBinaryOp),
IsIn {
nulls_equal: bool,
},
ToFloat,
Round {
decimals: u32,
},
}Expand description
A SQL operation whose semantics depend on the operand dtypes. Only the SQL frontend creates these; they are lowered to ordinary expressions during DSL→IR conversion, once the dtypes are known, so every SQL entry point gets the same result.
Variants§
Binary(SqlBinaryOp)
lhs <op> rhs. A decimal literal (or a CASE of them) combined with a float
takes the float’s type, as a float literal would.
IsIn
is_in only.IN: number literals tested against a float take the float’s type. Other floats
tested against integers or decimals compare as floats, dates against datetimes as
datetimes, and nested values of the same shape as their supertype. This only gives the
membership; the SQL frontend adds the SQL null and empty set logic.
ToFloat
A decimal as Float64, for SQL functions without decimal implementations.
Round
round_series only.ROUND: decimals round half away from zero, as in Postgres.
Trait Implementations§
§impl Clone for SqlFunction
impl Clone for SqlFunction
§fn clone(&self) -> SqlFunction
fn clone(&self) -> SqlFunction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SqlFunction
§impl Debug for SqlFunction
impl Debug for SqlFunction
§impl<'de> Deserialize<'de> for SqlFunction
impl<'de> Deserialize<'de> for SqlFunction
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SqlFunction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SqlFunction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl Display for SqlFunction
impl Display for SqlFunction
impl Eq for SqlFunction
§impl Hash for SqlFunction
impl Hash for SqlFunction
§impl PartialEq for SqlFunction
impl PartialEq for SqlFunction
§impl Serialize for SqlFunction
impl Serialize for SqlFunction
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SqlFunction
Auto Trait Implementations§
impl Freeze for SqlFunction
impl RefUnwindSafe for SqlFunction
impl Send for SqlFunction
impl Sync for SqlFunction
impl Unpin for SqlFunction
impl UnsafeUnpin for SqlFunction
impl UnwindSafe for SqlFunction
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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 moreSource§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more