stevomitric opened a new pull request, #57082: URL: https://github.com/apache/spark/pull/57082
### What changes were proposed in this pull request? Widen the timestamp guard in `PartitioningUtils.castPartValueToDesiredType` so that partition values are cast when the desired partition-column type is an `AnyTimestampNanoType` (`TimestampNTZNanosType`/`TimestampLTZNanosType` at precision 7-9) ### Why are the changes needed? Without this, dynamically writing then reading back a table partitioned on a nanosecond-precision timestamp column failed to reconstruct the partition value and raised `INVALID_PARTITION_VALUE` when casting the escaped directory name to the declared nanos type. ### Does this PR introduce _any_ user-facing change? Yes. Nanosecond-precision timestamp columns (`TIMESTAMP_NTZ(p)`/`TIMESTAMP_LTZ(p)`, p in [7, 9]) can now be used as file-source partition columns. ### How was this patch tested? Added `PartitionedWriteSuite` coverage: write-then-read round-trip for both NTZ and LTZ nanos partition columns. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.8 -- 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]
