----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40589/#review111311 -----------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveSortUnionReduceRule.java (line 84) <https://reviews.apache.org/r/40589/#comment171432> The real value of pushing limit past union is to push it further down (by pushing it past sel, join). If the sortrel ended up just below union & if sortrel also had sort in it (i.e if union's input is synthetic limit) then i think we should remove it. May be we should enhance HiveSortRemoveRule to look for pattern SortRel-union-SortRel and remove synthetic SortRel below union if it has sort in it. Otherwise we end up paying double sorting cost. - John Pullokkaran On Dec. 17, 2015, 10:47 p.m., pengcheng xiong wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/40589/ > ----------------------------------------------------------- > > (Updated Dec. 17, 2015, 10:47 p.m.) > > > Review request for hive and Ashutosh Chauhan. > > > Repository: hive-git > > > Description > ------- > > HIVE-11775 > > > Diffs > ----- > > common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 243f281 > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveSortUnionReduceRule.java > PRE-CREATION > ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java 36a12bf > ql/src/test/queries/clientpositive/cbo_SortUnionTransposeRule.q > PRE-CREATION > ql/src/test/queries/clientpositive/limit_join_transpose.q 80430c6 > ql/src/test/queries/clientpositive/tez_dynpart_hashjoin_3.q cecbbd7 > ql/src/test/results/clientpositive/cbo_SortUnionTransposeRule.q.out > PRE-CREATION > > Diff: https://reviews.apache.org/r/40589/diff/ > > > Testing > ------- > > > Thanks, > > pengcheng xiong > >