cloud-fan commented on a change in pull request #31729:
URL: https://github.com/apache/spark/pull/31729#discussion_r587204018
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/LiteralExpressionSuite.scala
##########
@@ -349,4 +349,22 @@ class LiteralExpressionSuite extends SparkFunSuite with
ExpressionEvalHelper {
assert(literalStr === "2021-02-03 17:50:03.456")
}
}
+
+ test("SPARK-34605: construct literals from java.time.Duration") {
+ Seq(
+ Duration.ofNanos(0),
+ Duration.ofSeconds(-1),
+ Duration.ofNanos(123456000),
+ Duration.ofDays(106751991),
+ Duration.ofDays(-106751991)).foreach { duration =>
+ checkEvaluation(Literal(duration), duration)
+ }
+ }
+
+ test("SPARK-34605: construct literals from arrays of java.time.Duration") {
+ val duration0 = Duration.parse("P2DT3H4M")
Review comment:
ditto
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]