Module: SparkConnect::Window
- Defined in:
- lib/spark_connect/window.rb
Overview
Factory entry point for building WindowSpecs. Mirrors PySpark's Window.
Constant Summary collapse
- UNBOUNDED_PRECEDING =
WindowSpec::UNBOUNDED_PRECEDING
- UNBOUNDED_FOLLOWING =
WindowSpec::UNBOUNDED_FOLLOWING
- CURRENT_ROW =
WindowSpec::CURRENT_ROW
Class Method Summary collapse
-
.order_by(*cols) ⇒ WindowSpec
Ordered by the given columns.
-
.partition_by(*cols) ⇒ WindowSpec
Partitioned by the given columns.
-
.range_between(start_, end_) ⇒ WindowSpec
With a range-based frame.
-
.rows_between(start_, end_) ⇒ WindowSpec
With a row-based frame.
Class Method Details
.order_by(*cols) ⇒ WindowSpec
Returns ordered by the given columns.
105 106 107 |
# File 'lib/spark_connect/window.rb', line 105 def order_by(*cols) WindowSpec.new.order_by(*cols) end |
.partition_by(*cols) ⇒ WindowSpec
Returns partitioned by the given columns.
100 101 102 |
# File 'lib/spark_connect/window.rb', line 100 def partition_by(*cols) WindowSpec.new.partition_by(*cols) end |
.range_between(start_, end_) ⇒ WindowSpec
Returns with a range-based frame.
115 116 117 |
# File 'lib/spark_connect/window.rb', line 115 def range_between(start_, end_) WindowSpec.new.range_between(start_, end_) end |
.rows_between(start_, end_) ⇒ WindowSpec
Returns with a row-based frame.
110 111 112 |
# File 'lib/spark_connect/window.rb', line 110 def rows_between(start_, end_) WindowSpec.new.rows_between(start_, end_) end |