You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "BELUGA BEHR (JIRA)" <ji...@apache.org> on 2018/07/27 16:36:00 UTC

[jira] [Created] (HIVE-20255) Review LevelOrderWalker.java

BELUGA BEHR created HIVE-20255:
----------------------------------

             Summary: Review LevelOrderWalker.java
                 Key: HIVE-20255
                 URL: https://issues.apache.org/jira/browse/HIVE-20255
             Project: Hive
          Issue Type: Improvement
          Components: Query Planning
    Affects Versions: 3.0.0, 4.0.0
            Reporter: BELUGA BEHR
             Fix For: 3.1.0
         Attachments: HIVE-20255.1.patch

https://github.com/apache/hive/blob/6d890faf22fd1ede3658a5eed097476eab3c67e9/ql/src/java/org/apache/hadoop/hive/ql/lib/LevelOrderWalker.java

* Make code more concise
* Fix some check style issues

{code}
      if (toWalk.get(index).getChildren() != null) {
        for(Node child : toWalk.get(index).getChildren()) {
{code}

Actually, the underlying implementation of {{getChildren()}} has to do some real work, so do not throw away the work after checking for null.  Simply call once and store the results.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)