Skip to content

Commit d4d4bcc

Browse files
committed
fix(polars): ensure that null literals are not mistakenly made non-null
1 parent 14620bb commit d4d4bcc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ibis/backends/polars/compiler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def literal(op, **_):
8282
value = op.value
8383
dtype = op.dtype
8484

85+
if value is None:
86+
return pl.lit(None, dtype=PolarsType.from_ibis(dtype))
87+
8588
if dtype.is_array():
8689
value = pl.Series("", value)
8790
typ = PolarsType.from_ibis(dtype)

0 commit comments

Comments
 (0)