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

Replaces filter and size with count

    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, 3.2.0
    • Component/s: ML, Spark Core, SQL
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: