Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-45314 Drop Scala 2.12 and make Scala 2.13 by default
  3. SPARK-45602

Replace `s.c.MapOps.filterKeys` with `s.c.MapOps.view.filterKeys`

    XMLWordPrintableJSON

Details

    Description

      /** Filters this map by retaining only keys satisfying a predicate.
        *  @param  p   the predicate used to test keys
        *  @return an immutable map consisting only of those key value pairs of this map where the key satisfies
        *          the predicate `p`. The resulting map wraps the original map without copying any elements.
        */
      @deprecated("Use .view.filterKeys(f). A future version will include a strict version of this method (for now, .view.filterKeys(p).toMap).", "2.13.0")
      def filterKeys(p: K => Boolean): MapView[K, V] = new MapView.FilterKeys(this, p) 

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: