Skip to content

Commit 83630aa

Browse files
committed
fix(sqlglot): manually cast to avoid incorrect optimization
1 parent 8046d3f commit 83630aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ibis/backends/sql/compilers/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,9 @@ def if_(self, condition, true, false: sge.Expression | None = None) -> sge.If:
534534
)
535535

536536
def cast(self, arg, to: dt.DataType) -> sge.Cast:
537-
return sg.cast(sge.convert(arg), to=self.type_mapper.from_ibis(to), copy=False)
537+
return sge.Cast(
538+
this=sge.convert(arg), to=self.type_mapper.from_ibis(to), copy=False
539+
)
538540

539541
def _prepare_params(self, params):
540542
result = {}

0 commit comments

Comments
 (0)