

def _needs_parens(op):
    if isinstance(op, ir.Expr):
        op = op.op()
    op_klass = type(op)
    return ((op_klass in _binary_infix_ops) or (op_klass in [ops.Negate]))

dataset/ETHPy150Open cloudera/ibis/ibis/impala/compiler.py _needs_parens/original