Skip to main content

normalize_identifiers

Function normalize_identifiers 

Source
pub fn normalize_identifiers(
    expression: Expression,
    dialect: Option<DialectType>,
) -> Expression
Expand description

Normalize identifiers in an expression based on dialect rules.

This transformation reflects how identifiers would be resolved by the engine corresponding to each SQL dialect. For example:

  • FoOfoo in PostgreSQL (lowercases unquoted)
  • FoOFOO in Snowflake (uppercases unquoted)
  • "FoO"FoO preserved when quoted (case-sensitive)

§Arguments

  • expression - The expression to normalize
  • dialect - The dialect to use for normalization rules

§Returns

The expression with normalized identifiers