

def _xor(translator, expr):
    op = expr.op()
    left_arg = translator.translate(op.left)
    right_arg = translator.translate(op.right)
    if _needs_parens(op.left):
        left_arg = _parenthesize(left_arg)
    if _needs_parens(op.right):
        right_arg = _parenthesize(right_arg)
    return '{0} AND NOT {1}'.format('({0} {1} {2})'.format(left_arg, 'OR', right_arg), '({0} {1} {2})'.format(left_arg, 'AND', right_arg))

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