Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-20255

Review LevelOrderWalker.java

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.0, 4.0.0
    • 4.0.0-alpha-1
    • Query Planning
    • None
    • Patch

    Description

      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
            if (toWalk.get(index).getChildren() != null) {
              for(Node child : toWalk.get(index).getChildren()) {
      

      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.

      Attachments

        1. HIVE-20255.10.patch
          5 kB
          David Mollitor
        2. HIVE-20255.11.patch
          5 kB
          David Mollitor
        3. HIVE-20255.12.patch
          5 kB
          David Mollitor
        4. HIVE-20255.13.patch
          5 kB
          David Mollitor
        5. HIVE-20255.14.patch
          5 kB
          David Mollitor
        6. HIVE-20255.15.patch
          5 kB
          David Mollitor
        7. HIVE-20255.16.patch
          5 kB
          David Mollitor
        8. HIVE-20255.17.patch
          5 kB
          David Mollitor
        9. HIVE-20255.18.patch
          5 kB
          David Mollitor
        10. HIVE-20255.9.patch
          5 kB
          David Mollitor

        Activity

          People

            belugabehr David Mollitor
            belugabehr David Mollitor
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: