Closed sjrusso8 closed 2 months ago
feat(window): create Window & WindowSpec
Window
WindowSpec
over
Column
let df = spark.createDataFrame(&data)?; let window = Window::new() .partitionBy(col("category")) .orderBy([col("id")]) .rowsBetween(Window::currentRow(), 1); let df = df .withColumn("sum", sum("id").over(window)) .sort([col("id"), col("category"), col("sum")]);
Description
feat(window): create Window & WindowSpec
Window
&WindowSpec
based a similar implementation of the existing Spark API.over
method ontoColumn
and add unit testExample Usage