Skip to content

Commit

Permalink
chore: clean up ctx specification
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored Dec 30, 2024
1 parent 62fa479 commit cf6bf9c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions ibis/backends/polars/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1257,12 +1257,11 @@ def execute_union(op, **kw):


@translate.register(ops.Intersection)
def execute_intersection(op, **kw):
ctx = kw.get("ctx")
def execute_intersection(op, *, ctx, **kw):
ctx.register_many(
frames={
"left": translate(op.left, **kw),
"right": translate(op.right, **kw),
"left": translate(op.left, ctx=ctx **kw),
"right": translate(op.right, ctx=ctx, **kw),
}
)
sql = (
Expand All @@ -1277,12 +1276,11 @@ def execute_intersection(op, **kw):


@translate.register(ops.Difference)
def execute_difference(op, **kw):
ctx = kw.get("ctx")
def execute_difference(op, *, ctx, **kw):
ctx.register_many(
frames={
"left": translate(op.left, **kw),
"right": translate(op.right, **kw),
"left": translate(op.left, ctx=ctx, **kw),
"right": translate(op.right, ctx=ctx, **kw),
}
)
sql = (
Expand Down

0 comments on commit cf6bf9c

Please sign in to comment.