@dispatch(Field, Select)
def compute_up(expr, data, **kwargs):
    name = expr._name
    try:
        inner_columns = list(data.inner_columns)
        names = list(c.name for c in data.inner_columns)
        column = inner_columns[names.index(name)]
    except (KeyError, __HOLE__):
        single_column_select = compute(
            expr,
            first(data.inner_columns),
            post_compute=False,
            return_type='native',
        )
        column = first(single_column_select.inner_columns)
        result = unify_froms(sa.select([column]),
                             data.froms + single_column_select.froms)
        return result.where(unify_wheres([data, single_column_select]))
    else:
        return data.with_only_columns([column])
dataset/ETHPy150Open blaze/blaze/blaze/compute/sql.py/compute_up