Skip to content

Commit

Permalink
add comment explaining why we don't set window bounds for shift opera…
Browse files Browse the repository at this point in the history
…tions in pyspark backend
  • Loading branch information
Hyonjee authored and toryhaavik committed Oct 23, 2019
1 parent e94945c commit e4ad7f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ibis/pyspark/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,8 @@ def compile_window_op(t, expr, scope, **kwargs):

pyspark_window = Window.partitionBy(grouping_keys).orderBy(ordering_keys)

# If the operand is a shift op (e.g. lead, lag), Spark will set the window
# bounds. Only set window bounds here if not a shift operation.
if not isinstance(operand.op(), ops.ShiftBase):
start = (
-window.preceding
Expand Down

0 comments on commit e4ad7f0

Please sign in to comment.