Expand description
SQL Utility Functions
StructsΒ§
EnumsΒ§
ConstantsΒ§
FunctionsΒ§
- check_
column_ πsatisfies_ expr - check_
columns_ πsatisfy_ exprs - Determines if the set of
Exprβs are a valid projection on the inputExpr::Columnβs. - extract_
aliases π - Returns mapping of each alias (
String) to the expression (Expr) it is aliasing. - make_
decimal_ πtype - Returns a validated
DataTypefor the specified precision and scale - normalize_
ident π - Normalize an owned identifier to a lowercase string, unless the identifier is quoted.
- push_
projection_ πdedupl - rebase_
expr π - Rebuilds an
Expras a projection on top of a collection ofExprβs. - resolve_
aliases_ πto_ exprs - Rebuilds an
Exprwith columns that refer to aliases replaced by the aliasβ underlyingExpr. - resolve_
columns π - Make a best-effort attempt at resolving all columns in the expression tree
- resolve_
positions_ πto_ exprs - Given an expression thatβs literal int encoding position, lookup the corresponding expression in the select_exprs list, if the index is within the bounds and it is indeed a position literal, otherwise, returns planning error. If input expression is not an int literal, returns expression as-is.
- rewrite_
recursive_ πunnest_ bottom_ up - The context is we want to rewrite unnest() into InnerProjection->Unnest->OuterProjection Given an expression which contains unnest expr as one of its children, Try transform depends on unnest type
- rewrite_
recursive_ πunnests_ bottom_ up - value_
to_ πstring - window_
expr_ common_ partition_ keys - Given a slice of window expressions sharing the same sort key, find their common partition keys.