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

Replaces filter and size with count

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.2.0
    • 2.4.8, 3.0.2, 3.1.1, 3.2.0
    • ML, Spark Core, SQL
    • None

    Description

      Use count to simplify find + size(or length) operation, it's semantically consistent, but looks simpler.

      Before

      seq.filter(p).size

      After

      seq.count(p)

      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: