Skip to content

Commit

Permalink
fix(polars): ensure that null literals are not mistakenly made non-null
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Nov 5, 2024
1 parent 14620bb commit d4d4bcc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ibis/backends/polars/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def literal(op, **_):
value = op.value
dtype = op.dtype

if value is None:
return pl.lit(None, dtype=PolarsType.from_ibis(dtype))

if dtype.is_array():
value = pl.Series("", value)
typ = PolarsType.from_ibis(dtype)
Expand Down

0 comments on commit d4d4bcc

Please sign in to comment.