facebook/presto — pull request #1804 by nileema (2014-10-13 19:28:02+00:00)
Title: Fix row number optimizations for unreferenced outputs

Channels referenced in partition by or orderby clauses of RowNumberLimit and TopNRowNumber nodes are pruned if they are not referenced. Fix this in the PruneUnreferencedOutputs optimizer so that these channels are carried forward.