WindowSpec (Snowpark Java API Reference 1.19.0)

Package com.snowflake.snowpark_java

## Class WindowSpec

- java.lang.Object
- - com.snowflake.snowpark_java.WindowSpec

-     public class WindowSpec
      extends java.lang.Object

  Represents a window frame clause.
  Since:
    0.9.0

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `WindowSpec` | `orderBy​(Column... cols)` | Returns a new WindowSpec object with the new order by clause.
    `WindowSpec` | `partitionBy​(Column... cols)` | Returns a new WindowSpec object with the new partition by clause.
    `WindowSpec` | `rangeBetween​(long start, long end)` | Returns a new WindowSpec object with the new range frame clause.
    `WindowSpec` | `rowsBetween​(long start, long end)` | Returns a new WindowSpec object with the new row frame clause.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### partitionBy

          public WindowSpec partitionBy​(Column... cols)

      Returns a new WindowSpec object with the new partition by clause.
      Parameters:
        `cols` - A list of input column
      Returns:
        The result WindowSpec
      Since:
        0.9.0

    - #### orderBy

          public WindowSpec orderBy​(Column... cols)

      Returns a new WindowSpec object with the new order by clause.
      Parameters:
        `cols` - A list of input column
      Returns:
        The result WindowSpec
      Since:
        0.9.0

    - #### rowsBetween

          public WindowSpec rowsBetween​(long start,
                                        long end)

      Returns a new WindowSpec object with the new row frame clause.
      Parameters:
        `start` - The starting index
        `end` - The ending index
      Returns:
        The result WindowSpec
      Since:
        0.9.0

    - #### rangeBetween

          public WindowSpec rangeBetween​(long start,
                                         long end)

      Returns a new WindowSpec object with the new range frame clause.
      Parameters:
        `start` - The starting index
        `end` - The ending index
      Returns:
        The result WindowSpec
      Since:
        0.9.0