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

Max Gekk updated SPARK-57809:
-----------------------------
    Labels: starter  (was: )

> Support nanosecond-precision timestamps in collect_list/listagg ordering 
> safety
> -------------------------------------------------------------------------------
>
>                 Key: SPARK-57809
>                 URL: https://issues.apache.org/jira/browse/SPARK-57809
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 4.3.0
>            Reporter: Max Gekk
>            Priority: Major
>              Labels: starter
>
> This sub-task is part of the umbrella SPARK-56822 (timestamps with nanosecond 
> precision).
> h2. Problem
> {{collect.scala}} {{isCastEqualityPreserving}} (~L750-762) marks 
> {{TimestampNTZType}} as cast-equality-preserving and {{TimestampType}} (LTZ, 
> DST) as unsafe, but has no arm for {{TimestampNTZNanosType}} / 
> {{TimestampLTZNanosType}}, so both fall to {{case _ => false}}. NTZ nanos 
> should be treated like NTZ micro (safe); LTZ nanos like LTZ micro.
> h2. Goal
> Add nanosecond arms so the ORDER BY-cast optimization applies to NTZ nanos 
> and correctly excludes LTZ nanos, matching the microsecond behavior.
> h2. Scope
> Extend {{isCastEqualityPreserving}} (and any sibling checks) for 
> {{TimestampNTZNanosType}} and {{TimestampLTZNanosType}}.
> h2. Acceptance criteria
> * Ordered {{collect_list}} / {{listagg}} over NTZ nanos uses the safe path; 
> LTZ nanos keeps the same DST caveat as micro LTZ.
> h2. Testing
> {{collect.scala}}-related suites; targeted unit test.
> h2. Dependencies
> None - independent (builds on the resolved widening/cast infrastructure).



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