Skip to main content

get_output_column_names

Function get_output_column_names 

Source
pub fn get_output_column_names(expr: &Expression) -> Vec<String>
Expand description

Collect projected output column names from a query expression.

This follows sqlglot-style query semantics:

  • For SELECT, returns names from the projection list.
  • For set operations (UNION/INTERSECT/EXCEPT), uses the left-most branch.
  • For Subquery, unwraps and evaluates the inner query.

Unlike get_column_names, this does not return every referenced column in the AST and is suitable for result-schema style output names.