Skip to content

Commit 69be180

Browse files
committed
fix(clickhouse): return the correct type from InSubquery operations
1 parent 476353e commit 69be180

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ibis/backends/sql/compilers/clickhouse.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,5 +880,10 @@ def visit_MapContains(self, op, *, arg, key):
880880
sg.or_(arg.is_(NULL), key.is_(NULL)), NULL, self.f.mapContains(arg, key)
881881
)
882882

883+
def visit_InSubquery(self, op, *, needle, rel):
884+
# clickhouse returns `a IN b` as integers so we have to cast to get
885+
# booleans
886+
return self.cast(super().visit_InSubquery(op, needle=needle, rel=rel), op.dtype)
887+
883888

884889
compiler = ClickHouseCompiler()

0 commit comments

Comments
 (0)