You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Max Gekk (Jira)" <ji...@apache.org> on 2026/07/01 14:26:00 UTC
[jira] [Updated] (SPARK-57820) Support nanosecond-precision timestamps in time_bucket
[ https://issues.apache.org/jira/browse/SPARK-57820?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Max Gekk updated SPARK-57820:
-----------------------------
Shepherd: Max Gekk
> 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
> Priority: Major
>
> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org