-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix lead/lag for zero offset (#9026)
Summary: The lead and lag return incorrect result if the offset is zero and ignore nulls is true. The reason is that, the `rowNumberIgnoreNull` assumes the offset is bigger than zero. This pr does two changes: - if the offset is constant, then make a fast path to return the rowNumbers - if the offset is not constant, then add a pre-condition check if the offset is 0 and return current row Pull Request resolved: #9026 Reviewed By: Yuhta Differential Revision: D55158362 Pulled By: kagamiori fbshipit-source-id: 28082a1fee98c372f672bbd64db10af40fa685c8
- Loading branch information
1 parent
9b4a210
commit c4d3f6f
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters