Skip to content

Commit

Permalink
chore(clickhouse): workaround broken sqlglot
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Jul 20, 2023
1 parent bbc1eb7 commit 3997451
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ibis/backends/clickhouse/compiler/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ def _xor(op, **kw):
left = _parenthesize(op.left, raw_left)
raw_right = translate_val(op.right, **kw)
right = _parenthesize(op.right, raw_right)
return f"xor({left}, {right})"
# clickhouse has xor but sqlglot's compilation of this function is broken
# in 17.6.0
return f"(({left} or {right}) and not ({left} and {right}))"


@translate_val.register(ops.Arbitrary)
Expand Down

0 comments on commit 3997451

Please sign in to comment.