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

fix pyspark.rdd.RDD.histogram's buckets argument

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0, 3.1.1, 3.1.2
    • 3.2.0, 3.1.3, 3.3.0
    • PySpark

    Description

      I originally opened an issue and created a PR in the https://github.com/zero323/pyspark-stubs repository.

      Issue: https://github.com/zero323/pyspark-stubs/issues/548

      PR: https://github.com/zero323/pyspark-stubs/pull/549

      The type hint for pyspark.rdd.RDD.histogram's buckets argument should be Union[int, List[T], Tuple[T, ...]]

      From pyspark source:

      if isinstance(buckets, int):
          ...
      elif isinstance(buckets, (list, tuple)):
          ...
      else:
          raise TypeError("buckets should be a list or tuple or number(int or long)")
      

      Attachments

        Activity

          People

            tpvasconcelos Tomas Pereira de Vasconcelos
            tpvasconcelos Tomas Pereira de Vasconcelos
            Maciej Szymkiewicz Maciej Szymkiewicz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified