

@dispatch(Sort, (sa.Table, ColumnElement))
def compute_up(t, s, **kwargs):
    s = select(s)
    direction = (sa.asc if t.ascending else sa.desc)
    cols = [direction(lower_column(s.c[c])) for c in listpack(t.key)]
    return s.order_by(*cols)

dataset/ETHPy150Open blaze/blaze/blaze/compute/sql.py compute_up/original