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

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

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0, 3.1.1, 3.1.2
    • Fix Version/s: 3.2.0, 3.1.3, 3.3.0
    • Component/s: 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

            • Assignee:
              tpvasconcelos Tomas Pereira de Vasconcelos
              Reporter:
              tpvasconcelos Tomas Pereira de Vasconcelos
              Shepherd:
              Maciej Szymkiewicz
            • Votes:
              0 Vote for this issue
              Watchers:
              4 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