----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35584/#review88333 -----------------------------------------------------------
exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/WindowPrule.java (line 64) <https://reviews.apache.org/r/35584/#comment140805> Currently your query will fail with an unsupported operation error: Error: UNSUPPORTED_OPERATION ERROR: Multiple window definitions in a single SELECT list is not currently supported See Apache Drill JIRA: DRILL-3196 I am not sure if resetting the traits in the loop would cause incorrect results; it would be suboptimal. There is a comment at the beginning: // TODO: Order window based on existing partition by //input.getTraitSet().subsumes() exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/WindowPrule.java (line 99) <https://reviews.apache.org/r/35584/#comment140806> Yes, I will use window.collation() to be consistent. exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/WindowPrule.java (line 100) <https://reviews.apache.org/r/35584/#comment140807> Agree..the convert() is not necessary in this case. Will remove and assign convertedInput = SingleMergeExchange. - Aman Sinha On June 17, 2015, 11:59 p.m., Aman Sinha wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35584/ > ----------------------------------------------------------- > > (Updated June 17, 2015, 11:59 p.m.) > > > Review request for drill and Jinfeng Ni. > > > Bugs: DRILL-3298 > https://issues.apache.org/jira/browse/DRILL-3298 > > > Repository: drill-git > > > Description > ------- > > The JIRA DRILL-3298 has relevant discussion on this. The fix involves > creating a single stream as input to the Window by inserting a > SingleMergeExchange if only the ORDER-BY clause is present in a Window. This > ensures that the Sort below the Window is done in parallel followed by a > Merge. > > > Diffs > ----- > > > exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/WindowPrule.java > f7728c8 > > Diff: https://reviews.apache.org/r/35584/diff/ > > > Testing > ------- > > Manual testing of the query in DRILL-3298. Ran unit tests. Functional tests > are in progress. > > > Thanks, > > Aman Sinha > >
