def _get_all_table_names(sql_spans):
  """Returns set of all table names in sql_spans."""
  # Use a list to preserve some ordering.
  table_names = []
  for sql_span in sql_spans:
    if sql_span.table_name:
      if sql_span.table_name not in table_names:
        table_names.append(sql_span.table_name)
    elif sql_span.column:
      if sql_span.column.table_name not in table_names:
        table_names.append(sql_span.column.table_name)
  return table_names
Returns set of all table names in sql_spans.
language/xsp/data_preprocessing/abstract_sql.py