Max Gekk created SPARK-57820:
--------------------------------
Summary: Support nanosecond-precision timestamps in time_bucket
Key: SPARK-57820
URL: https://issues.apache.org/jira/browse/SPARK-57820
Project: Spark
Issue Type: Sub-task
Components: SQL
Affects Versions: 4.3.0
Reporter: Max Gekk
This sub-task is part of the umbrella SPARK-56822 (timestamps with nanosecond
precision).
h2. Problem
{{TimeBucket}} (datetimeExpressions.scala ~L4433-4498) types its
timestamp/origin args as {{AnyTimestampType}} and casts the timestamp to
{{Long}} micros in {{nullSafeEval}}, so nanosecond timestamps are rejected /
narrowed.
h2. Goal
Bucket a nanosecond timestamp by an interval width, returning the same
nanosecond type/precision with {{nanosWithinMicro}} handled consistently with
the bucket width.
h2. Scope
Accept {{AnyTimestampNanoType}}; add a {{TimestampNanosVal}} bucketing path.
h2. Acceptance criteria
* {{time_bucket(width, ts_nanos[, origin])}} returns aligned nanosecond
buckets; microsecond behavior unchanged.
h2. Testing
{{DateExpressionsSuite}}; nanos golden files.
h2. Dependencies
None - independent.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]