Packages

o

org.apache.sedona.viz.sql.operator

AggregateWithinPartitions

object AggregateWithinPartitions

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AggregateWithinPartitions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def apply(dataFrame: DataFrame, keyCol: String, valueCol: String, aggFunc: String): DataFrame

    Run aggregation within each partition without incurring a data shuffle.

    Run aggregation within each partition without incurring a data shuffle. Currently support three aggregates, sum, count, avg. If the aggregate func is count, this function doesn't require a value column. If the aggregate func is sum and avg, it will require a value column. They are same as the regular aggregation SQL

    SELECT pixel, COUNT(*) FROM t GROUP BY pixel

    SELECT pixel, AVG(weight) FROM t GROUP BY pixel

    SELECT pixel, AVG(weight) FROM t GROUP BY pixel

    keyCol

    GroupBy key

    valueCol

    Aggregate value

    aggFunc

    Aggregate function