RelationalGroupedDataset

org.apache.spark.sql.RelationalGroupedDataset

A set of methods for aggregations on a Dataset, created by Dataset.groupBy, Dataset.rollup, Dataset.cube, Dataset.groupingSets, or pivot.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def agg(expr: Column, exprs: Column*): DataFrame

Compute aggregates by specifying a series of aggregate columns.

Compute aggregates by specifying a series of aggregate columns.

Attributes

def agg(aggExpr: (String, String), aggExprs: (String, String)*): DataFrame

Compute aggregates by specifying (column name, aggregate method) pairs, e.g. agg("age" -> "max", "salary" -> "avg"). The method may be avg/mean, max, min, sum, count, or any other aggregate function name.

Compute aggregates by specifying (column name, aggregate method) pairs, e.g. agg("age" -> "max", "salary" -> "avg"). The method may be avg/mean, max, min, sum, count, or any other aggregate function name.

Attributes

def agg(exprs: Map[String, String]): DataFrame

Compute aggregates by specifying a map from column name to aggregate function name.

Compute aggregates by specifying a map from column name to aggregate function name.

Attributes

def agg(exprs: Map[String, String]): DataFrame

(Java-specific) Compute aggregates from a map of column name to aggregate function name.

(Java-specific) Compute aggregates from a map of column name to aggregate function name.

Attributes

def avg(colNames: String*): DataFrame
def count(): DataFrame

Count the number of rows for each group.

Count the number of rows for each group.

Attributes

def max(colNames: String*): DataFrame
def mean(colNames: String*): DataFrame
def min(colNames: String*): DataFrame
def pivot(pivotColumn: String): RelationalGroupedDataset

Pivots a column of the current Dataset and performs the specified aggregation.

Pivots a column of the current Dataset and performs the specified aggregation.

Attributes

Pivots a column, computing the distinct values on the server.

Pivots a column, computing the distinct values on the server.

Attributes

def pivot(pivotColumn: String, values: Seq[Any]): RelationalGroupedDataset

Pivots a column over the given values.

Pivots a column over the given values.

Attributes

def pivot(pivotColumn: String, values: List[Any]): RelationalGroupedDataset

(Java-specific) Pivots a column over the given values.

(Java-specific) Pivots a column over the given values.

Attributes

def pivot(pivotColumn: Column, values: List[Any]): RelationalGroupedDataset

(Java-specific) Pivots a column over the given values.

(Java-specific) Pivots a column over the given values.

Attributes

def pivot(pivotColumn: Column, values: Seq[Any]): RelationalGroupedDataset

Pivots a column over the given values (literals or literal columns).

Pivots a column over the given values (literals or literal columns).

Attributes

def sum(colNames: String*): DataFrame