Skip to content

Commit

Permalink
fix(polars): handle the case of an empty InValues list
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Nov 17, 2023
1 parent ab3bf26 commit b26aa55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ibis/backends/polars/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ def in_column(op, **kw):
def in_values(op, **kw):
value = translate(op.value, **kw)
options = list(map(translate, op.options))
if not options:
return pl.lit(False)
return pl.any_horizontal([value == option for option in options])


Expand Down

0 comments on commit b26aa55

Please sign in to comment.