Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-4366 Aggregation Improvement
  3. SPARK-10941

.Refactor AggregateFunction2 and AlgebraicAggregate interfaces to improve code clarity

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • SQL
    • None

    Description

      Spark SQL's new AlgebraicAggregate interface is confusingly named.

      AlgebraicAggregate inherits from AggregateFunction2, adds a new set of methods, then effectively bans the use of the inherited methods. This is really confusing. I think that it's an anti-pattern / bad code smell if you end up inheriting and wanting to remove methods inherited from the superclass.

      I think that we should re-name this class and should refactor the class hierarchy so that there's a clear distinction between which parts of the code work with imperative aggregate functions vs. expression-based aggregates.

      Attachments

        Activity

          People

            joshrosen Josh Rosen
            joshrosen Josh Rosen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: