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

   ### What changes were proposed in this pull request?
   
   This PR adds test coverage for the `to_xml` write path with the 
nanosecond-precision timestamp types (`TIMESTAMP_NTZ(p)` / `TIMESTAMP_LTZ(p)`, 
`p in [7, 9]`). The write path exists in `StaxXmlGenerator` but had no 
dedicated tests, while `from_xml` (read) and both JSON directions were already 
covered.
   
   Two tests are added to `XmlFunctionsSuite`:
   - `to_xml with nanos timestamp types` — asserts the exact XML output for 
both NTZ and LTZ nanos types at every valid precision.
   - `roundtrip in to_xml and from_xml - nanos timestamps` — verifies the write 
-> read round-trip is loss-free at every valid precision.
   
   ### Why are the changes needed?
   
   The `to_xml` nanosecond write path was implemented but never exercised by a 
test, leaving a coverage gap for the XML datasource nanosecond support 
(SPARK-57458).
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Test-only change.
   
   ### How was this patch tested?
   
   `build/sbt "sql/testOnly org.apache.spark.sql.XmlFunctionsSuite"`.
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   Co-authored-by: Claude Code 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]

Reply via email to