shrirangmhalgi opened a new pull request, #56653:
URL: https://github.com/apache/spark/pull/56653

   ### What changes were proposed in this pull request?
   Add native `TimeType` support to the built-in JDBC data source. 
`getCatalystType` maps `java.sql.Types.TIME` to `TimeType` (gated behind 
`spark.sql.timeType.enabled`), `getCommonJDBCType` maps `TimeType` to SQL 
`TIME`, and value read / write uses `java.time.LocalTime`. Per-dialect 
overrides are left for follow-up sub-tasks.
   
   ### Why are the changes needed?
   JDBC currently maps `java.sql.Types.TIME` to `TimestampType`, losing 
time-only semantics. With TimeType now supported in Spark, the JDBC source 
should read and write TIME columns natively.
   
   ### Does this PR introduce any user-facing change?
   Yes. When `spark.sql.timeType.enabled` is `true`, JDBC TIME columns are 
inferred as `TimeType` with driver-reported precision, and `TimeType` columns 
can be written as SQL TIME. When disabled (default), behavior is unchanged.
   
   ### How was this patch tested?
   - Read, write round-trip, and sub-second precision tests against H2
   - Legacy back-compat tests preserved with `timeType.enabled=false`
   - All 6 TIME-related tests pass
   
   ### Was this patch authored or co-authored using generative AI tooling?
   Co-Authored using Claude Opus 4.6


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to