facebook/presto — pull request #1593 by nileema (2014-08-26 18:13:03+00:00)
Title: Change operator for row_number to be completely streaming

Earlier RowNumberLimit was a streaming operator only if there was a filter on the row_number column that imposed a limit. Change it to RowNumberOperator so that it streams the data and retain the filter node.

A row_number window function with order by is handled by the TopNRowNumber operator. Add a merge node in the distributed plan if TopNRowNumber is not partitioned.