[ 
https://issues.apache.org/jira/browse/HIVE-22079?focusedWorklogId=317210&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-317210
 ]

ASF GitHub Bot logged work on HIVE-22079:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Sep/19 06:49
            Start Date: 24/Sep/19 06:49
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on pull request #780: HIVE-22079: 
Post order walker for iterating over expression tree
URL: https://github.com/apache/hive/pull/780#discussion_r327439736
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/lib/ExpressionWalker.java
 ##########
 @@ -35,63 +40,69 @@ public ExpressionWalker(Dispatcher disp) {
   }
 
 
-  /**
-   * We should bypass subquery since we have already processed and created 
logical plan
-   * (in genLogicalPlan) for subquery at this point.
-   * SubQueryExprProcessor will use generated plan and creates appropriate 
ExprNodeSubQueryDesc.
-   */
-  private boolean shouldByPass(Node childNode, Node parentNode) {
-    if(parentNode instanceof ASTNode
-            && ((ASTNode)parentNode).getType() == 
HiveParser.TOK_SUBQUERY_EXPR) {
-      ASTNode parentOp = (ASTNode)parentNode;
-      //subquery either in WHERE <LHS> IN <SUBQUERY> form OR WHERE EXISTS 
<SUBQUERY> form
-      //in first case LHS should not be bypassed
-      assert(parentOp.getChildCount() == 2 || parentOp.getChildCount()==3);
-      if(parentOp.getChildCount() == 3 && (ASTNode)childNode == 
parentOp.getChild(2)) {
-        return false;
-      }
-      return true;
+  private class NodeLabeled {
+    private Node nd;
 
 Review comment:
   `final`?
 
----------------------------------------------------------------
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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 317210)
    Time Spent: 0.5h  (was: 20m)

> Post order walker for iterating over expression tree
> ----------------------------------------------------
>
>                 Key: HIVE-22079
>                 URL: https://issues.apache.org/jira/browse/HIVE-22079
>             Project: Hive
>          Issue Type: Improvement
>          Components: Logical Optimizer, Physical Optimizer
>    Affects Versions: 4.0.0
>            Reporter: Vineet Garg
>            Assignee: Vineet Garg
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22079.1.patch, HIVE-22079.2.patch, 
> HIVE-22079.3.patch, HIVE-22079.4.patch, HIVE-22079.5.patch, 
> HIVE-22079.6.patch, HIVE-22079.7.patch
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Current {{DefaultGraphWalker}} is used to iterate over an expression tree. 
> This walker uses hash map to keep track of visited/processed nodes. If an 
> expression tree is large this adds significant overhead due to map lookup.
> For an expression trees we can instead use post order traversal and avoid 
> using map.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to