pub enum SqlFunction {
Show 129 variants
Count,
Sum,
Avg,
Min,
Max,
Stddev,
Variance,
StddevPop,
StddevSamp,
VarPop,
VarSamp,
ArrayAgg,
StringAgg,
GroupConcat,
Listagg,
Median,
Mode,
PercentileCont,
PercentileDisc,
ApproxCountDistinct,
AnyValue,
First,
Last,
BoolAnd,
BoolOr,
BitAnd,
BitOr,
BitXor,
Corr,
CovarPop,
CovarSamp,
RegrSlope,
Every,
RowNumber,
Rank,
DenseRank,
Ntile,
CumeDist,
PercentRank,
Lag,
Lead,
FirstValue,
LastValue,
NthValue,
Coalesce,
Nullif,
Ifnull,
Now,
CurrentTimestamp,
CurrentDate,
Date,
DateTrunc,
Extract,
DatePart,
Year,
Month,
Day,
DayOfWeek,
Quarter,
MakeDate,
MakeTime,
MakeTimestamp,
MakeTimestamptz,
Age,
Concat,
Upper,
Lower,
Trim,
Ltrim,
Rtrim,
Substring,
Substr,
Length,
CharLength,
CharacterLength,
ToChar,
Replace,
Translate,
Reverse,
Repeat,
Lpad,
Rpad,
Initcap,
QuoteIdent,
QuoteLiteral,
Left,
Right,
Position,
Strpos,
SplitPart,
Abs,
Sign,
Round,
Trunc,
Truncate,
Ceil,
Ceiling,
Floor,
Power,
Pow,
Sqrt,
Exp,
Ln,
Log,
Log10,
Log2,
Mod,
Sin,
Cos,
Tan,
Asin,
Acos,
Atan,
Atan2,
Sinh,
Cosh,
Tanh,
Pi,
Random,
Greatest,
Least,
JsonObject,
JsonArray,
ToJson,
JsonExtract,
JsonExtractText,
JsonArrayLength,
JsonObjectKeys,
JsonContains,
}Expand description
Known SQL function names used across smelt crates.
Every function that appears in type inference, optimizer analysis, diagnostics, or test generators should have a variant here.
Variants§
Count
Sum
Avg
Min
Max
Stddev
Variance
StddevPop
StddevSamp
VarPop
VarSamp
ArrayAgg
StringAgg
GroupConcat
Listagg
Median
Mode
PercentileCont
PercentileDisc
ApproxCountDistinct
AnyValue
First
Last
BoolAnd
BoolOr
BitAnd
BitOr
BitXor
Corr
CovarPop
CovarSamp
RegrSlope
Every
RowNumber
Rank
DenseRank
Ntile
CumeDist
PercentRank
Lag
Lead
FirstValue
LastValue
NthValue
Coalesce
Nullif
Ifnull
Now
CurrentTimestamp
CurrentDate
Date
DateTrunc
Extract
DatePart
Year
Month
Day
DayOfWeek
Quarter
MakeDate
MakeTime
MakeTimestamp
MakeTimestamptz
Age
Concat
Upper
Lower
Trim
Ltrim
Rtrim
Substring
Substr
Length
CharLength
CharacterLength
ToChar
Replace
Translate
Reverse
Repeat
Lpad
Rpad
Initcap
QuoteIdent
QuoteLiteral
Left
Right
Position
Strpos
SplitPart
Abs
Sign
Round
Trunc
Truncate
Ceil
Ceiling
Floor
Power
Pow
Sqrt
Exp
Ln
Log
Log10
Log2
Mod
Sin
Cos
Tan
Asin
Acos
Atan
Atan2
Sinh
Cosh
Tanh
Pi
Random
Greatest
Least
JsonObject
json_object / json_build_object — construct JSON object from key-value pairs
JsonArray
json_array / json_build_array — construct JSON array from values
ToJson
to_json / to_jsonb / row_to_json — convert value to JSON
JsonExtract
json_extract / json_extract_path — extract JSON subtree (returns JSON)
JsonExtractText
json_extract_string / json_extract_text / json_extract_path_text / get_json_object — extract as text
JsonArrayLength
json_array_length — number of elements in JSON array
JsonObjectKeys
json_object_keys / json_keys — keys of JSON object
JsonContains
json_contains — JSON containment check
Implementations§
Source§impl SqlFunction
impl SqlFunction
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Look up a function by name (case-insensitive).
Accepts both canonical smelt names and dialect-specific aliases
(e.g., JSON_BUILD_OBJECT → JsonObject, GET_JSON_OBJECT → JsonExtractText).
Sourcepub fn category(&self) -> FunctionCategory
pub fn category(&self) -> FunctionCategory
Function category.
Sourcepub fn is_aggregate(&self) -> bool
pub fn is_aggregate(&self) -> bool
Whether this function is an aggregate function.
Sourcepub fn is_window(&self) -> bool
pub fn is_window(&self) -> bool
Whether this function is a window function (ranking, distribution, or navigation).
Sourcepub fn all() -> impl Iterator<Item = SqlFunction>
pub fn all() -> impl Iterator<Item = SqlFunction>
Iterator over all known SQL functions.
Trait Implementations§
Source§impl Clone for SqlFunction
impl Clone for SqlFunction
Source§fn clone(&self) -> SqlFunction
fn clone(&self) -> SqlFunction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more