diff --git a/ibis/backends/clickhouse/compiler/values.py b/ibis/backends/clickhouse/compiler/values.py index 52862e8ae479..46b14c3581ff 100644 --- a/ibis/backends/clickhouse/compiler/values.py +++ b/ibis/backends/clickhouse/compiler/values.py @@ -850,9 +850,9 @@ def tr(op, *, cache, **kw): # annoying to detect so we let it through to enable the # uncorrelated use case (pandas-style `.isin`) subquery = translate(options.to_expr().as_table().op(), {}) - right_arg = f"({subquery})" + right_arg = f"({_sql(subquery)})" else: - right_arg = translate_val(options, cache=cache, **kw) + right_arg = _sql(translate_val(options, cache=cache, **kw)) # we explicitly do NOT parenthesize the right side because it doesn't # make sense to do so for Sequence operations