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

Introduce a `exists` function for `TreeNode` to eliminate duplicate code pattern

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • SQL
    • None

    Description

      There are many duplicate code patterns in Spark code:

      treeNode.find(condition).isDefined 
      treeNode.find(condition).nonEmpty 
      treeNode.find(condition).isEmpty

      Maybe we can introduce an `exists` function to simplify the above code patterns.

      Attachments

        Activity

          People

            LuciferYang Yang Jie
            LuciferYang Yang Jie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: