----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/1568/#review1700 -----------------------------------------------------------
http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/ExprWalkerInfo.java <https://reviews.apache.org/r/1568/#comment3855> The predicates are already cloned in ExprWalkerProcFactory.extractPushdownPreds() and this behavior is inconsistent with addPushdowns() which doesn't clone the predicates. Moreover, not cloning the expressions is convenient for the newToOldExprMap so that now the ExprNodeDesc's can be compared with == instead of a deep comparison of the tree. http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java <https://reviews.apache.org/r/1568/#comment3856> From what I understand, currently, when the PPD encounters a JoinOperator, mergeChildrenPred is used to find the filters that are not being pushed down past that operator based on the alias and these should be the same filters that are stored in ExprWalkerInfo.nonFinalPreds (except the filters we want filter on the output columns of the JoinOperator while the nonFinalPreds filter on its input). The bug in HIVE-2383 is that alias filtering should be done in the context of the JoinOperator, not on its children, so now mergeChildrenPred doesn't return the correct filters to create. I changed the JoinPPD to use the nonFinalPreds to figure out which filters to create and added a map in ExprWalkerInfo.newToOldExprMap to store the mapping from each filter in the operator's context to the filter that it came from in the children's context (this is populated during ExprWalkerProcFactory.extractPushdownPreds()). - Charles On 2011-08-31 05:01:19, Charles Chen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/1568/ > ----------------------------------------------------------- > > (Updated 2011-08-31 05:01:19) > > > Review request for hive. > > > Summary > ------- > > https://issues.apache.org/jira/browse/HIVE-2383 > > > This addresses bug HIVE-2383. > https://issues.apache.org/jira/browse/HIVE-2383 > > > Diffs > ----- > > > http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/ExprWalkerInfo.java > 1163438 > > http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/ExprWalkerProcFactory.java > 1163438 > > http://svn.apache.org/repos/asf/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java > 1163438 > > http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/queries/clientpositive/ppd_repeated_alias.q > PRE-CREATION > > http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientpositive/auto_join8.q.out > 1163438 > > http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientpositive/index_auto_mult_tables.q.out > 1163438 > > http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientpositive/join8.q.out > 1163438 > > http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientpositive/ppd_repeated_alias.q.out > PRE-CREATION > > http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/clientpositive/udf_bitmap_empty.q.out > 1163438 > > http://svn.apache.org/repos/asf/hive/trunk/ql/src/test/results/compiler/plan/join8.q.xml > 1163438 > > Diff: https://reviews.apache.org/r/1568/diff > > > Testing > ------- > > > Thanks, > > Charles > >