July 2017
Intermediate to advanced
796 pages
18h 55m
English
Count is the most basic aggregate function, which simply counts the number of rows for the column specified. An extension is the countDistinct, which also eliminates duplicates.
The count API has several implementations, as follows. The exact API used depends on the specific use case:
def count(columnName: String): TypedColumn[Any, Long]Aggregate function: returns the number of items in a group.def count(e: Column): ColumnAggregate function: returns the number of items in a group.def countDistinct(columnName: String, columnNames: String*): ColumnAggregate function: returns the number of distinct items in a group.def countDistinct(expr: Column, exprs: Column*): ColumnAggregate function: returns the number of distinct items in a group. ...
Read now
Unlock full access