----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37778/#review102185 -----------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/optimizer/PartitionColumnsSeparator.java (line 154) <https://reviews.apache.org/r/37778/#comment159749> Checking for ExprNodeConstantDesc does not seem necessary. If children are not null, we loop. Otherwise, we just go to the end of the method. ql/src/java/org/apache/hadoop/hive/ql/optimizer/PartitionColumnsSeparator.java (line 173) <https://reviews.apache.org/r/37778/#comment159750> This check does not seem necessary, as method will return null by default. ql/src/java/org/apache/hadoop/hive/ql/optimizer/PartitionColumnsSeparator.java (line 203) <https://reviews.apache.org/r/37778/#comment159746> I think the children.size() should not be necessary, as we will always have at least two children, right? ql/src/java/org/apache/hadoop/hive/ql/optimizer/PartitionColumnsSeparator.java (line 215) <https://reviews.apache.org/r/37778/#comment159747> exprContainsOnlyPartitionColOrVirtualColOrConstants is recursive. Why cannot we pass (ExprNodeGenericFuncDesc)children.get(0) directly to get whether we can apply the optimization or not? ql/src/java/org/apache/hadoop/hive/ql/optimizer/PartitionColumnsSeparator.java (line 249) <https://reviews.apache.org/r/37778/#comment159754> What about expressions such as a+5, where column a is a partition column that belongs to table x? Shouldn't tab alias be x? I do not understand that here (and subsequently) we call to en.getExprString() as an alternative to the table alias when the node is not ExprNodeColumnDesc, as I think it is not the way to cluster together the partition expressions that referred to the same table. Or I am missing something? - Jesús Camacho Rodríguez On Oct. 8, 2015, 5:26 p.m., Hari Sankar Sivarama Subramaniyan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37778/ > ----------------------------------------------------------- > > (Updated Oct. 8, 2015, 5:26 p.m.) > > > Review request for hive, Ashutosh Chauhan, Jesús Camacho Rodríguez, and John > Pullokkaran. > > > Repository: hive-git > > > Description > ------- > > Support partition pruning for IN(STRUCT(partcol, nonpartcol..)...) > > > Diffs > ----- > > common/src/java/org/apache/hadoop/hive/conf/HiveConf.java bf48f69 > ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java 439f616 > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/PartitionColumnsSeparator.java > PRE-CREATION > ql/src/java/org/apache/hadoop/hive/ql/optimizer/PointLookupOptimizer.java > d83636d > ql/src/java/org/apache/hadoop/hive/ql/optimizer/pcr/PcrExprProcFactory.java > 825938a > ql/src/java/org/apache/hadoop/hive/ql/optimizer/ppr/OpProcFactory.java > 7262164 > ql/src/java/org/apache/hadoop/hive/ql/plan/FilterDesc.java 6a31689 > ql/src/test/queries/clientpositive/pcs.q PRE-CREATION > ql/src/test/queries/clientpositive/pointlookup.q 1aef2ef > ql/src/test/queries/clientpositive/pointlookup2.q 31bebbb > ql/src/test/queries/clientpositive/pointlookup3.q 3daa94b > ql/src/test/results/clientpositive/dynpart_sort_optimization_acid.q.out > eca29df > ql/src/test/results/clientpositive/pcs.q.out PRE-CREATION > ql/src/test/results/clientpositive/pointlookup.q.out 7e19be4 > > Diff: https://reviews.apache.org/r/37778/diff/ > > > Testing > ------- > > Local testing done. More unit tests coming in the next patch. > > > Thanks, > > Hari Sankar Sivarama Subramaniyan > >