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

Replaces filter and check for emptiness with exists or forall

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 2.4.8, 3.0.2, 3.1.1
    • Component/s: Spark Core, SQL
    • Labels:
      None

      Description

      Semantic consistency and code Simpilefications

      before:

      seq.filter(p).size == 0)
      seq.filter(p).length > 0
      seq.filterNot(p).isEmpty
      seq.filterNot(p).nonEmpty
      

      after:

      !seq.exists(p)
      seq.exists(p)
      seq.forall(p)
      !seq.forall(p)
      

       

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: