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

Replaces filter and check for emptiness with exists or forall

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.2.0
    • 2.4.8, 3.0.2, 3.1.1
    • Spark Core, SQL
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: