Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-42883 Implement Pandas API Missing Parameters
  3. SPARK-39048

Refactor `GroupBy._reduce_for_stat_function` on accepted data types

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • None
    • PySpark
    • None

    Description

      `Groupby._reduce_for_stat_function` is a common helper function leveraged by multiple statistical functions of GroupBy objects.

      It defines parameters `only_numeric` and `bool_as_numeric` to control accepted Spark types.

      To be consistent with pandas API, we may also have to introduce `str_as_numeric` for `sum` for example.

      Instead of introducing parameters designated for each Spark type, the PR is proposed to introduce a parameter `accepted_spark_types` to specify accepted types of Spark columns to be aggregated.

      Attachments

        Activity

          People

            XinrongM Xinrong Meng
            XinrongM Xinrong Meng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: