org.apache.spark.sql.expressions

Members list

Type members

Classlikes

object Window

Entry point for building WindowSpecs. Mirrors org.apache.spark.sql.expressions.Window.

Entry point for building WindowSpecs. Mirrors org.apache.spark.sql.expressions.Window.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Window.type
class WindowSpec

A window specification that defines the partitioning, ordering, and frame boundaries of an analytic / windowed computation. Build with Window.

A window specification that defines the partitioning, ordering, and frame boundaries of an analytic / windowed computation. Build with Window.

 import org.apache.spark.sql.expressions.Window
 import org.apache.spark.sql.functions._
 val w = Window.partitionBy("dept").orderBy(col("salary").desc)
 df.select(col("*"), rank().over(w).as("r"))

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object WindowSpec

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
WindowSpec.type