facebook/presto — pull request #1385 by frsyuki (2014-06-12 21:56:56+00:00)
Title: Fix TopN distributed plan to wrap partial TopN plan in merge TopN plan

I'm creating a distributed query plan formatter and realized that TopNNode with partial=true wraps TopNNode with partial=false.
For example, with this query: `select r_regionkey from tpch.region order by r_regionkey limit 2`
distributed query plan is:

```
- Stage-1
-> Output[6]
Columns: r_regionkey = r:bigint
-> FinalTopN[9]
Count: 2
OrderBy: r ASC NULLS LAST
-> Exchange[8]
Sources: Stage-0
- Stage-0
-> Sink[7]
-> PartialTopN[2]
Count: 2
OrderBy: r ASC NULLS LAST
-> TableScan[0]
Table: tpch.region
Columns: r:bigint = r_regionkey
```

PartialTopN plan node wraps FinalTopN plan, which should be opposite.
I think DistributedLogicalPlanner.visitTopN is creating wrong TopNNode combination.