@dispatch(Symbol)
def _lean(expr, fields=None):
    if not fields or set(expr.fields).issubset(fields):
        return expr, fields
    else:
        return expr[sorted(fields)], fields
>>> s = symbol('s', '{x: int, y: int}')
dataset/ETHPy150Open blaze/blaze/blaze/expr/optimize.py/_lean