Skip to content

Commit

Permalink
chore(deps): lock file maintenance (#9865)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Phillip Cloud <[email protected]>
  • Loading branch information
renovate[bot] and cpcloud authored Aug 20, 2024
1 parent 9754efc commit e6756f3
Show file tree
Hide file tree
Showing 4 changed files with 605 additions and 558 deletions.
19 changes: 17 additions & 2 deletions ibis/backends/polars/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1114,9 +1114,24 @@ def comparison(op, **kw):
@translate.register(ops.Between)
def between(op, **kw):
op_arg = op.arg
arg_dtype = op_arg.dtype

arg = translate(op_arg, **kw)
lower = translate(op.lower_bound, **kw)
upper = translate(op.upper_bound, **kw)

dtype = PolarsType.from_ibis(arg_dtype)

lower_bound = op.lower_bound
lower = translate(lower_bound, **kw)

if lower_bound.dtype != arg_dtype:
lower = lower.cast(dtype)

upper_bound = op.upper_bound
upper = translate(upper_bound, **kw)

if upper_bound.dtype != arg_dtype:
upper = upper.cast(dtype)

return arg.is_between(lower, upper, closed="both")


Expand Down
Loading

0 comments on commit e6756f3

Please sign in to comment.