pub struct Function {
pub qualified_name: Vec<Identifier>,
pub on_error: Option<Box<SqlBehavior>>,
pub source_dialect: Option<DialectType>,
pub name: String,
pub args: Vec<Expression>,
pub distinct: bool,
pub trailing_comments: Vec<String>,
pub use_bracket_syntax: bool,
pub no_parens: bool,
pub quoted: bool,
pub span: Option<Span>,
pub inferred_type: Option<DataType>,
}Expand description
Represent a scalar function call (e.g. UPPER(name), COALESCE(a, b)).
This is the generic function node. Well-known aggregates, window functions,
and built-in functions each have their own dedicated Expression variants
(e.g. Count, Sum, WindowFunction). Functions that the parser does
not recognize as built-ins are represented with this struct.
Fields§
§qualified_name: Vec<Identifier>Qualified name components preserve quoting without changing the node kind.
on_error: Option<Box<SqlBehavior>>Optional DEFAULT/NULL/ERROR behavior after the arguments.
source_dialect: Option<DialectType>Dialect whose call semantics must be retained through independent generation.
name: StringThe function name, as originally written (may be schema-qualified).
args: Vec<Expression>Positional arguments to the function.
distinct: boolWhether DISTINCT was specified inside the call (e.g. COUNT(DISTINCT x)).
trailing_comments: Vec<String>§use_bracket_syntax: boolWhether this function uses bracket syntax (e.g., MAP[keys, values])
no_parens: boolWhether this function was called without parentheses (e.g., CURRENT_TIMESTAMP vs CURRENT_TIMESTAMP())
quoted: boolWhether the function name was quoted (e.g., p.d.UdF in BigQuery)
span: Option<Span>Source position span
inferred_type: Option<DataType>Inferred data type from type annotation
Implementations§
Source§impl Function
impl Function
Sourcepub fn qualified(name: Vec<Identifier>, args: Vec<Expression>) -> Self
pub fn qualified(name: Vec<Identifier>, args: Vec<Expression>) -> Self
Construct a call with individually quoted qualified name components.