Skip to content

Commit 9c159a7

Browse files
committed
refactor(api)!: offset argument in Table.limit is now required-keyword
1 parent 12a6074 commit 9c159a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ibis/expr/decompile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def union(op, left, right, distinct):
234234
@translate.register(ops.Limit)
235235
def limit(op, parent, n, offset):
236236
if offset:
237-
return f"{parent}.limit({n}, {offset})"
237+
return f"{parent}.limit({n}, offset={offset})"
238238
else:
239239
return f"{parent}.limit({n})"
240240

ibis/expr/types/relations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ def sample(
12981298
self, fraction=fraction, method=method, seed=seed
12991299
).to_expr()
13001300

1301-
def limit(self, n: int | None, offset: int = 0) -> Table:
1301+
def limit(self, n: int | None, *, offset: int = 0) -> Table:
13021302
"""Select `n` rows from `self` starting at `offset`.
13031303
13041304
::: {.callout-note}

0 commit comments

Comments
 (0)