

def _negate(translator, expr):
    arg = expr.op().args[0]
    formatted_arg = translator.translate(arg)
    if isinstance(expr, ir.BooleanValue):
        return 'NOT {0!s}'.format(formatted_arg)
    else:
        if _needs_parens(arg):
            formatted_arg = _parenthesize(arg)
        return '-{0!s}'.format(formatted_arg)

dataset/ETHPy150Open cloudera/ibis/ibis/impala/compiler.py _negate/VarMisuse@71/99 `formatted_arg`->`arg`