-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-31129][SQL][Tests] Fix IntervalBenchmark and DateTimeBenchmark #27885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc @dongjoon-hyun @cloud-fan, thank you very much. |
Hi, @yaooqinn . If this is not the last one, could you proceed as a single PR for all benchmark? |
Also, please create a new JIRA issue. The old one is already committed as |
I'll re-run all benchmarks to see if any same issue exists, thank you very much for your advice |
org.apache.spark.sql.execution.benchmark.DateTimeBenchmark[error] Caused by: java.time.format.DateTimeParseException: Text '2019-01-27 11:02:01.0' could not be parsed at index 20
[error] at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2046)
[error] at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1874)
[error] at org.apache.spark.sql.catalyst.util.Iso8601TimestampFormatter.$anonfun$parse$1(TimestampFormatter.scala:71)
[error] ... 19 more |
@yaooqinn can you point out what query causes this issue? |
|
Test build #119691 has finished for PR 27885 at commit
|
@@ -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'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will fail with 2019-01-27 11:02:01.12(123)
Test build #119700 has finished for PR 27885 at commit
|
Test build #119705 has finished for PR 27885 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for recovering benchmark suites, @yaooqinn and @cloud-fan .
I also checked the failure and the recovery. Merged to master/3.0.
### What changes were proposed in this pull request? This PR aims to recover `IntervalBenchmark` and `DataTimeBenchmark` due to banning intervals as output. ### Why are the changes needed? This PR recovers the benchmark suite. ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Manually, re-run the benchmark. Closes #27885 from yaooqinn/SPARK-31111-2. Authored-by: Kent Yao <yaooqinn@hotmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit fbc9dc7) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
### What changes were proposed in this pull request? This PR aims to recover `IntervalBenchmark` and `DataTimeBenchmark` due to banning intervals as output. ### Why are the changes needed? This PR recovers the benchmark suite. ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Manually, re-run the benchmark. Closes apache#27885 from yaooqinn/SPARK-31111-2. Authored-by: Kent Yao <yaooqinn@hotmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
What changes were proposed in this pull request?
This PR aims to recover
IntervalBenchmark
andDataTimeBenchmark
due to banning intervals as output.Why are the changes needed?
This PR recovers the benchmark suite.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Manually, re-run the benchmark.