org.apache.spark.sql.expressions
package 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 Objecttrait Matchableclass 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 Objecttrait Matchableclass Any
object WindowSpec
Attributes
- Companion
- class
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
WindowSpec.type
In this article