[ 
https://issues.apache.org/jira/browse/SPARK-57785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-57785:
-----------------------------------
    Labels: pull-request-available  (was: )

> Support window RANGE frames with offset bounds over a TIME ORDER BY column
> --------------------------------------------------------------------------
>
>                 Key: SPARK-57785
>                 URL: https://issues.apache.org/jira/browse/SPARK-57785
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 4.3.0
>            Reporter: Max Gekk
>            Priority: Major
>              Labels: pull-request-available
>
> h2. Background
> Umbrella: SPARK-57550 (Extend support for the TIME data type), SPIP 
> SPARK-51162.
> ANSI SQL permits window frames of the form
> {{RANGE BETWEEN <offset> PRECEDING AND <offset> FOLLOWING}} where the {{ORDER 
> BY}} column
> is a datetime type and the offset is an interval. For DATE/TIMESTAMP, Spark 
> supports
> value-based RANGE frames with day-time / year-month interval offsets.
> h2. Problem
> It is not verified whether a {{TimeType}} {{ORDER BY}} column is supported in 
> value-based
> RANGE frames (where the offset would be a day-time interval, e.g.
> {{RANGE BETWEEN INTERVAL '1' HOUR PRECEDING AND CURRENT ROW}}). The expected 
> behavior
> and supported offset type for TIME are undefined, so this may throw an 
> unclear error or
> behave inconsistently with DATE/TIMESTAMP.
> h2. Scope
> * Determine the expected semantics for value-based RANGE frames with a TIME 
> order column
>   (offset type, wrap-around behavior at the 00:00 / 23:59:59.999999999 
> boundaries).
> * Support TIME as the RANGE-frame ordering column with a day-time interval 
> offset, matching
>   DATE/TIMESTAMP behavior; or, if intentionally unsupported, raise a clear, 
> typed error
>   and document the limitation.
> * Add window-function tests covering TIME RANGE frames (positive and/or 
> clear-error cases).
> h2. Acceptance
> * {{RANGE BETWEEN <interval> PRECEDING/FOLLOWING}} over a TIME {{ORDER BY}} 
> column either
>   works on par with DATE/TIMESTAMP or fails with a clear, documented error -- 
> verified by
>   tests.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to