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

   ### What changes were proposed in this pull request?
   
   Add TIME type inference to `XmlInferSchema`, completing format parity with 
CSV and JSON data sources (SPARK-57572).
   
   ### Why are the changes needed?
   
   After SPARK-57572 added TIME inference to CSV and JSON, XML was the only 
text-based format without TIME type inference. This was explicitly noted as a 
follow-up in that PR's review.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. When `spark.sql.timeType.enabled=true` (default), XML values matching 
the time format (e.g. `13:31:24.123456`) are now inferred as `TimeType` instead 
of `StringType`.
   
   ### How was this patch tested?
   
   Added 4 tests to XmlInferSchemaSuite:
   - Basic TIME inference
   - Disabled when timeType.enabled=false
   - Negative cases (date/timestamp not misclassified)
   - Cross-row merge (TIME+TIME, TIME+string)
   
   ### 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