class_docstr: Removes unnecessary columns from SELECT statements in the SQL query plan.
  
  As the visitor traverses up to the parents, it pushes the list of required columns and rewrites the parent nodes.
class_docstr_tok: ["Removes","unnecessary","columns","from","SELECT","statements","in","the","SQL","query","plan",".","As","the","visitor","traverses","up","to","the","parents",",","it","pushes","the","list","of","required","columns","and","rewrites","the","parent","nodes","."]
docstr: Constructor.
  
  Args:
      required_column_aliases: the columns aliases that should not be pruned from the SELECT statements that this
      visits.
docstr_tok: ["Constructor",".","Args",":","required_column_aliases",":","the","columns","aliases","that","should","not","be","pruned","from","the","SELECT","statements","that","this","visits","."]
code: def __init__(
      self,
      required_column_aliases: Set[str],
  ) -> None:
      """Constructor.
  
      Args:
          required_column_aliases: the columns aliases that should not be pruned from the SELECT statements that this
          visits.
      """
      self._required_column_aliases = required_column_aliases
  
file_path: metricflow/metricflow/sql/optimizer/column_pruner.py
imports: from __future__ import annotations
  import logging
  from collections import defaultdict
  from typing import Dict, List, Set, Tuple
  from metricflow.sql.optimizer.sql_query_plan_optimizer import SqlQueryPlanOptimizer
  from metricflow.sql.sql_exprs import SqlExpressionTreeLineage
  from metricflow.sql.sql_plan import SqlJoinDescription, SqlQueryPlanNode, SqlQueryPlanNodeVisitor, SqlSelectColumn, SqlSelectQueryFromClauseNode, SqlSelectStatementNode, SqlTableFromClauseNode
label_desc: Use image node_id 1 to create a new SqlColumnPrunerVisitor object from inherited base classes: SqlQueryPlanNodeVisitor with example: obj = SqlColumnPrunerVisitor(required_column_aliases)