You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/12 07:21:03 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #27885: [SPARK-31129][SQL][Tests] Fix IntervalBenchmark and DateTimeBenchmark

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org