Skip to content

Commit

Permalink
fix(sql): subtract one from ntile output in string-generating backends
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Oct 13, 2023
1 parent 39eed1a commit 1d264dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ibis/backends/base/sql/registry/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def window(translator, op):
arg_formatted = translator.translate(func.__window_op__)
result = f"{arg_formatted} {window_formatted}"

if isinstance(func, ops.RankBase):
if isinstance(func, (ops.RankBase, ops.NTile)):
return f"({result} - 1)"
else:
return result
Expand Down

0 comments on commit 1d264dc

Please sign in to comment.