cloud-fan commented on code in PR #57963:
URL: https://github.com/apache/spark/pull/57963#discussion_r3768852284
##########
sql/core/src/test/scala/org/apache/spark/sql/XmlFunctionsSuite.scala:
##########
@@ -361,6 +361,69 @@ class XmlFunctionsSuite extends SharedSparkSession {
checkAnswer(dfTwo, readBackTwo)
}
+ test("SPARK-57458: to_xml with nanos timestamp types") {
+ withSQLConf(
+ SQLConf.TIMESTAMP_NANOS_TYPES_ENABLED.key -> "true",
+ SQLConf.SESSION_LOCAL_TIMEZONE.key -> "UTC") {
+ foreachNanosPrecision { p =>
+ // The pattern must carry `p` fractional digits to emit the full
declared precision; the
+ // stored value has exactly `p` significant digits, so the rendered
fraction is the first
Review Comment:
**Nit:**
`p` is fractional-second precision; `significant digits` is general numeric
terminology and can be read as applying to the whole timestamp.
```suggestion
// stored value is truncated to precision `p`, so the rendered
fraction is the first
```
--
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]