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/06/23 05:20:00 UTC
[jira] [Resolved] (SPARK-57454) Add type coercion and widening rules for nanosecond-precision timestamp types
[ https://issues.apache.org/jira/browse/SPARK-57454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Max Gekk resolved SPARK-57454.
------------------------------
Fix Version/s: 4.3.0
Resolution: Fixed
Issue resolved by pull request 56638
[https://github.com/apache/spark/pull/56638]
> Add type coercion and widening rules for nanosecond-precision timestamp types
> -----------------------------------------------------------------------------
>
> Key: SPARK-57454
> URL: https://issues.apache.org/jira/browse/SPARK-57454
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 4.3.0
> Reporter: Max Gekk
> Assignee: Max Gekk
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.3.0
>
>
> Umbrella: SPARK-56822 (Timestamps with nanosecond precision).
> Add implicit type coercion and widening support for the nanosecond-capable timestamp types TIMESTAMP_NTZ(p) and TIMESTAMP_LTZ(p) (p in 7-9), to reach parity with the microsecond TimestampType / TimestampNTZType.
> Today findWiderDateTimeType in TypeCoercionHelper is microsecond-only and has no default case, so any pair involving a nanosecond type (including micro+nanos and nanos(p1)+nanos(p2)) is unhandled and can fail analysis. There are currently no references to the nanosecond timestamp types anywhere under sql/catalyst/.../analysis/.
> Scope:
> - Extend findWiderDateTimeType: nanos<->micro widen to the nanosecond type; nanos(p1)<->nanos(p2) widen to max precision; nanos<->date.
> - Wire TypeCoercion and AnsiTypeCoercion (findTightestCommonType, findWiderTypeForTwo) and StringPromotionTypeCoercion.
> - Tests: UNION ALL, IN, CASE, coalesce, and binary comparisons mixing micro/nanos.
--
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