Skip to content

Commit

Permalink
chore: fix __xor__
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Sep 17, 2023
1 parent ce9fde1 commit 2739bc3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ibis/backends/duckdb/compiler/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -1342,12 +1342,11 @@ def _xor(op, **kw):
# https://github.com/tobymao/sqlglot/issues/2238
left = translate_val(op.left, **kw)
right = translate_val(op.right, **kw)
return sg.exp.And(
this=sg.exp.Paren(this=sg.exp.Or(this=left, expression=right)),
expression=sg.exp.Paren(
this=sg.exp.Not(this=sg.exp.And(this=left, expression=right))
),
result = sg.exp.And(
this=sg.exp.Or(this=left, expression=right),
expression=sg.exp.Not(this=sg.exp.And(this=left, expression=right)),
)
return result


### Ordering
Expand Down

0 comments on commit 2739bc3

Please sign in to comment.