cloud-fan commented on a change in pull request #27885:
[SPARK-31129][SQL][Tests] Fix IntervalBenchmark and DateTimeBenchmark
URL: https://github.com/apache/spark/pull/27885#discussion_r391438006
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/DateTimeBenchmark.scala
##########
@@ -114,12 +114,12 @@ object DateTimeBenchmark extends SqlBasedBenchmark {
}
runBenchmark("Parsing") {
val n = 1000000
- val timestampStrExpr = "concat('2019-01-27 11:02:01.', cast(mod(id,
1000) as string))"
+ val timestampStrExpr = "concat('2019-01-27 11:02:01.', rpad(mod(id,
1000), 3, '0'))"
val pattern = "'yyyy-MM-dd HH:mm:ss.SSS'"
Review comment:
one more thought: maybe we should change the pattern string to `yyyy-M-d
H:\m:s.S`, to match the behavior of 2.4
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]