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

Max Gekk updated SPARK-57853:
-----------------------------
    Shepherd: Max Gekk

> Define TIME +/- INTERVAL out-of-range semantics (modulo-24 vs overflow)
> -----------------------------------------------------------------------
>
>                 Key: SPARK-57853
>                 URL: https://issues.apache.org/jira/browse/SPARK-57853
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 4.3.0
>            Reporter: Max Gekk
>            Priority: Major
>
> This sub-task is part of the umbrella SPARK-57550 (extend support for the 
> TIME data type).
> h2. Problem
> {{DateTimeUtils.timeAddInterval}} (DateTimeUtils.scala ~L1238-1250) throws 
> when the result leaves {{[0, 24:00)}}. ANSI HOUR arithmetic on TIME is 
> modulo-24 (std ~L16582-16583). The out-of-range policy for TIME +/- INTERVAL 
> is a semantics decision that is not yet settled.
> h2. Goal
> Decide and implement the out-of-range policy for TIME +/- INTERVAL - ANSI 
> modulo-24 wrap vs Spark's current overflow error - document it, and apply it 
> consistently across {{TimeAddInterval}}, {{sequence}}, and TRY eval mode.
> h2. Scope
> Settle the policy; implement it in {{DateTimeUtils.timeAddInterval}} and the 
> related expressions; ensure TRY mode returns NULL where the non-TRY path 
> errors/wraps; document the behavior.
> h2. Acceptance criteria
> * {{TIME + INTERVAL}} that crosses midnight has documented, consistent 
> behavior; TRY mode returns NULL where non-TRY errors/wraps.
> h2. Testing
> {{TimeExpressionsSuite}}; TIME golden files.
> h2. Dependencies
> Relates to the sequence-over-TIME sub-task and SPARK-57560 (TRY-mode 
> arithmetic). Ideally settled before the sequence sub-task finalizes its 
> stepping behavior.



--
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