uros-b commented on code in PR #56317:
URL: https://github.com/apache/spark/pull/56317#discussion_r3361782424
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ToPrettyStringSuite.scala:
##########
@@ -135,6 +135,28 @@ class ToPrettyStringSuite extends SparkFunSuite with
ExpressionEvalHelper {
assert(prettyString.sql === child.sql)
}
+ test("TimestampNTZNanos as pretty strings") {
Review Comment:
```suggestion
test("SPARK-57256: TimestampNTZNanos as pretty strings") {
```
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ToPrettyStringSuite.scala:
##########
@@ -135,6 +135,28 @@ class ToPrettyStringSuite extends SparkFunSuite with
ExpressionEvalHelper {
assert(prettyString.sql === child.sql)
}
+ test("TimestampNTZNanos as pretty strings") {
+ def ntzNanos(micros: Long, nanos: Short): Expression =
+ ToPrettyString(Literal.create(new TimestampNanosVal(micros, nanos),
TimestampNTZNanosType(9)))
+ checkEvaluation(ntzNanos(0L, 1), "1970-01-01 00:00:00.000000001")
+ checkEvaluation(ntzNanos(1L, 0), "1970-01-01 00:00:00.000001")
+ checkEvaluation(
+ ToPrettyString(Literal.create(TimestampNanosVal.ZERO,
TimestampNTZNanosType(9))),
+ "1970-01-01 00:00:00")
+ }
+
+ test("TimestampLTZNanos as pretty strings") {
Review Comment:
```suggestion
test("SPARK-57256: TimestampLTZNanos as pretty strings") {
```
--
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]