alias_visibility_warning

Function alias_visibility_warning 

Source
pub fn alias_visibility_warning(
    dialect: Dialect,
    clause_name: &str,
    alias_name: &str,
    statement_index: usize,
) -> Issue
Expand description

Emits a warning for unsupported alias usage in a SQL clause.

This helper centralizes the warning emission logic for alias visibility checks across different clauses (GROUP BY, HAVING, ORDER BY, lateral aliases).

§Arguments

  • dialect - The SQL dialect being used
  • clause_name - The name of the clause where the alias is used (e.g., “GROUP BY”, “HAVING”)
  • alias_name - The name of the alias being referenced
  • statement_index - The index of the statement in the analysis request

§Returns

An Issue warning that can be pushed to the analyzer’s issue list.