# Buggy code
def get_result(self):
    roots = self.parent_roots

    if len(roots) == 1 and isinstance(roots[0], ops.Selection):
        fused_op = self._check_fusion(roots[0])
        if fused_op is not None:
            return fused_op

    return ops.Selection(self.parent, self.clean_exprs)


# Traceback (IbisTypeError)
In [1]: import ibis

In [2]: import pandas as pd

In [3]: client = ibis.pandas.connect({
...:         'df': pd.DataFrame({'a': [1, 2, 3]}),
...:         'df_unknown': pd.DataFrame({
...:             'array_of_strings': [['a', 'b'], [], ['c']],
...:         }),
...:     })
...:

In [4]: table = client.table('df')

In [5]: table.mutate(b=table.a).drop(['a'])
---------------------------------------------------------------------------
IbisTypeError                             Traceback (most recent call last)
<ipython-input-5-2f4c8dc18c5a> in <module>()
----> 1 table.mutate(b=table.a).drop(['a'])

/nas/dft/ire/dlovell/gitlab/ibis/ibis/expr/api.py in _table_drop(self, fields)
2829         raise KeyError('Fields not in table: {0!s}'.format(fields))
2830
-> 2831     return self.projection(to_project)
2832
2833

/nas/dft/ire/dlovell/gitlab/ibis/ibis/expr/api.py in projection(table, exprs)
2760     projector = L.Projector(table, exprs)
2761
-> 2762     op = projector.get_result()
2763     return TableExpr(op)
2764

/nas/dft/ire/dlovell/gitlab/ibis/ibis/expr/analysis.py in get_result(self)
761
762         if len(roots) == 1 and isinstance(roots[0], ops.Selection):
--> 763             fused_op = self._check_fusion(roots[0])
764             if fused_op is not None:
765                 return fused_op

/nas/dft/ire/dlovell/gitlab/ibis/ibis/expr/analysis.py in _check_fusion(self, root)
773         can_fuse = False
774
--> 775         resolved = _maybe_resolve_exprs(root.table, self.input_exprs)
776         if not resolved:
777             return None

/nas/dft/ire/dlovell/gitlab/ibis/ibis/expr/analysis.py in _maybe_resolve_exprs(table, exprs)
820 def _maybe_resolve_exprs(table, exprs):
821     try:
--> 822         return table._resolve(exprs)
823     except AttributeError:
824         return None

/nas/dft/ire/dlovell/gitlab/ibis/ibis/expr/types.py in _resolve(self, exprs)
797         out_exprs = []
798         for expr in exprs:
--> 799             expr = self._ensure_expr(expr)
800             out_exprs.append(expr)
801         return out_exprs

/nas/dft/ire/dlovell/gitlab/ibis/ibis/expr/types.py in _ensure_expr(self, expr)
803     def _ensure_expr(self, expr):
804         if isinstance(expr, six.string_types):
--> 805             return self[expr]
806         elif isinstance(expr, six.integer_types):
807             return self[self.schema().name_at_position(expr)]

/nas/dft/ire/dlovell/gitlab/ibis/ibis/expr/types.py in __getitem__(self, what)
728     def __getitem__(self, what):
729         if isinstance(what, six.string_types + six.integer_types):
--> 730             return self.get_column(what)
731
732         if isinstance(what, slice):

/nas/dft/ire/dlovell/gitlab/ibis/ibis/expr/types.py in get_column(self, name)
846         column : array expression
847         """
--> 848         ref = TableColumn(name, self)
849         return ref.to_expr()
850

/nas/dft/ire/dlovell/gitlab/ibis/ibis/expr/types.py in __init__(self, name, table_expr)
423         if name not in schema:
424             raise com.IbisTypeError(
--> 425                 "'{0}' is not a field in {1}".format(name, table_expr.columns)
426             )
427

IbisTypeError: 'b' is not a field in ['a']

# Fixed code
def get_result(self):
    roots = self.parent_roots
    first_root = roots[0]

    if len(roots) == 1 and isinstance(first_root, ops.Selection):
        fused_op = self._check_fusion(first_root)
        if fused_op is not None:
            return fused_op

    return ops.Selection(self.parent, self.clean_exprs)