docstr: Return all the columns of given tileable data. If the given tileable data is neither
  BaseDataFrameData nor BaseSeriesData, None will be returned, indicating that column pruning
  is not available for the given tileable data.
docstr_tok: ["Return","all","the","columns","of","given","tileable","data",".","If","the","given","tileable","data","is","neither","BaseDataFrameData","nor","BaseSeriesData",",","None","will","be","returned",",","indicating","that","column","pruning","is","not","available","for","the","given","tileable","data","."]
code: def _get_all_columns(data: TileableData) -> Union[Set[Any], None]:
      """
      Return all the columns of given tileable data. If the given tileable data is neither
      BaseDataFrameData nor BaseSeriesData, None will be returned, indicating that column pruning
      is not available for the given tileable data.
      """
      if (
          isinstance(data, BaseDataFrameData)
          and data.dtypes is not None
      ):
          return set(data.dtypes.index)
      elif isinstance(data, BaseSeriesData):
          return {data.name}
      else:
          return None
  
imports: from typing import List, Dict, Set, Any, Type, Union, Optional
  import pandas
  from .input_column_selector import InputColumnSelector
  from .self_column_selector import SelfColumnSelector
  from ..core import register_optimization_rule
  from ...core import OptimizationRecord, OptimizationRecordType, OptimizationRule, OptimizationRecords, Optimizer
  from .....core import TileableData
  from .....core.graph import EntityGraph
  from .....dataframe.core import parse_index, BaseSeriesData, BaseDataFrameData
  from .....dataframe.datasource.core import ColumnPruneSupportedDataSourceMixin
  from .....dataframe.groupby.aggregation import DataFrameGroupByAgg
  from .....dataframe.indexing.getitem import DataFrameIndex
  from .....dataframe.merge import DataFrameMerge
  from .....utils import implements
label_desc: Use image node_id 5 for calling the ColumnPruningRule obj's underlying member method code with example usage: obj._get_all_columns(data) and returns: set, unknown, None