You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Uroš Bojanić (Jira)" <ji...@apache.org> on 2026/08/11 10:51:01 UTC

[jira] [Assigned] (SPARK-57460) Support nanosecond-precision timestamp types in the JDBC datasource

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

Uroš Bojanić reassigned SPARK-57460:
------------------------------------

    Assignee: Stevo Mitric

> Support nanosecond-precision timestamp types in the JDBC datasource
> -------------------------------------------------------------------
>
>                 Key: SPARK-57460
>                 URL: https://issues.apache.org/jira/browse/SPARK-57460
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 4.3.0
>            Reporter: Max Gekk
>            Assignee: Stevo Mitric
>            Priority: Major
>              Labels: pull-request-available
>
> Umbrella: SPARK-56822 (Timestamps with nanosecond precision).
> Add read and write support for the nanosecond-capable timestamp types TIMESTAMP_NTZ(p) and TIMESTAMP_LTZ(p) (p in 7-9) so this datasource reaches parity with the microsecond TimestampType / TimestampNTZType. Remove the SPARK-57166 rejection guardrail (supportDataType / supportsDataType) once read and write are implemented and tested, and update FileBasedDataSourceSuite accordingly. Cover precisions 7-9 for both NTZ and LTZ.
> Scope (java.sql.Timestamp already carries sub-microsecond getNanos):
> - Spark->JDBC: add nanos cases to JdbcUtils.getCommonJDBCType (Types.TIMESTAMP; dialects may emit TIMESTAMP(p) / WITH TIME ZONE).
> - JDBC->Spark: getCatalystType / getTimestampType (map driver TIMESTAMP to nanos only when requested via option/dialect, to preserve default microsecond behavior).
> - Read: makeGetter builds TimestampNanosVal preserving rs.getTimestamp().getNanos().
> - Write: makeSetter sets full nanos.
> - Dialect hooks in JdbcDialects for DBs with explicit TIMESTAMP(p).
> - Guardrail: CreatableRelationProvider.supportsDataType whitelist in interfaces.scala.



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