-
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.
Add spill support to TopNRowNumber operator (#7139)
Summary: TopNRowNumber operator maintains a hash table of unique partition keys and a RowContainer of input rows with up to N rows per partition. When asked to spill, TopNRowNumber operator sorts accumulated input rows by partition and sorting keys, spills all of them, clears both hash table and RowContainer, and continues to accumulate future input into freed up hash table and container. After receiving (and spilling) all input, TopNRowNumber operator sort-merged spilled data and generates output. Since at this point all data is sorted by partition and sorting keys, the operator produces data in streaming fashion. Spilling is enabled by default. It can be disabled by setting topn_row_number_spill_enabled configuration property to false. Spilling after noMoreInput() is not supported yet. Pull Request resolved: #7139 Reviewed By: xiaoxmeng Differential Revision: D50455632 Pulled By: mbasmanova fbshipit-source-id: 76c42d19adec46ebb53ce514e344b6835dff3259
- Loading branch information
1 parent
d87866b
commit 55d5636
Showing
7 changed files
with
483 additions
and
22 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
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
Oops, something went wrong.