Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-28127

Micro optimization on TreeNode's mapChildren method

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • SQL
    • None

    Description

      The mapChildren method in the TreeNode class is commonly used. In this method, there's a if statement checking non-empty children. However, there's a cached lazy val containsChild, which avoids unnecessary computation since this containsChild is used in other methods anyway.

      Attachments

        Issue Links

          Activity

            People

              manifoldQAQ Yesheng Ma
              manifoldQAQ Yesheng Ma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: