Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Oct 16, 2017
1 parent cbc004a commit b9bb874
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions ibis/pandas/execution/selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,24 +259,7 @@ def get_table_columns(expression):

@physical_tables.register(ops.Selection)
def physical_tables_selection(sel):
sel_table_op = sel.table.op()
selections = sel.selections

raw_root_tables = (
s.op().root_tables() for s in selections
if isinstance(s, ir.ColumnExpr)
)
root_tables = [tables[0] for tables in raw_root_tables if len(tables) == 1]

every_selection_has_one_root = len(root_tables) == len(selections)
every_root_is_a_physical_table = all(
table.equals(sel_table_op) for table in root_tables
)

# Special case a Selection that is a simple projection from a PhysicalTable
if every_selection_has_one_root and every_root_is_a_physical_table:
return [sel_table_op]
return [sel]
return physical_tables(sel.table.op())


@physical_tables.register(ops.PhysicalTable)
Expand Down Expand Up @@ -345,14 +328,6 @@ def prune_overlapping_column_suffixes(selection_expr, data):
# Columns from the input DataFrame
data_columns = frozenset(data.columns)

# We either have 2 unique roots or every column is unique without a join
# suffix
assert len(suffixes) == 2 or not {
column for column in data_columns
if (constants.LEFT_JOIN_SUFFIX in column or
constants.RIGHT_JOIN_SUFFIX in column)
}

possible_columns = []
possible_used_columns = set()

Expand Down

0 comments on commit b9bb874

Please sign in to comment.