RelationalGroupedDataset

org.apache.spark.sql.RelationalGroupedDataset

A set of methods for aggregations on a Dataset, created by Dataset.groupBy, Dataset.rollup, Dataset.cube, or Dataset.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(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 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

def pivot(pivotColumn: String, values: Seq[Any]): RelationalGroupedDataset
def sum(colNames: String*): DataFrame