

def unify_wheres(selectables):
    clauses = list(unique((s._whereclause for s in selectables if hasattr(s, '_whereclause')), key=str))
    return (reduce(and_, clauses) if clauses else None)

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