letsflyinthesky commented on a change in pull request #1322:
URL: https://github.com/apache/hive/pull/1322#discussion_r460832421



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/ppd/OpProcFactory.java
##########
@@ -782,6 +790,89 @@ protected ExprWalkerInfo mergeChildrenPred(Node nd, 
OpWalkerInfo owi,
     }
   }
 
+  protected static Object splitFilter(FilterOperator op,
+      ExprWalkerInfo ewi, OpWalkerInfo owi) throws SemanticException {
+
+    RowSchema inputRS = op.getSchema();
+
+    Map<String, List<ExprNodeDesc>> pushDownPreds = ewi.getFinalCandidates();
+    Map<String, List<ExprNodeDesc>> unPushDownPreds = 
ewi.getNonFinalCandidates();
+
+    // combine all deterministic predicates into a single expression
+    List<ExprNodeDesc> deterministicPreds = new ArrayList<ExprNodeDesc>();
+    Iterator<List<ExprNodeDesc>> iterator1 = pushDownPreds.values().iterator();
+    while (iterator1.hasNext()) {
+      for (ExprNodeDesc pred : iterator1.next()) {
+        deterministicPreds = ExprNodeDescUtils.split(pred, deterministicPreds);

Review comment:
       yes, may we could remove iterator here




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to