-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-15498][TESTS] fix slow tests #13273
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
| val trimmed = line.trim | ||
| formatter.addLine(code.comment.getOrElse(trimmed, trimmed)) | ||
| } | ||
| formatter.result() |
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.
cc @sarutak , here I assume the placeholder will always take an entire line, is it corrected?
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.
How slow is it if we use an regexp to match the placeholder here?
|
Test build #59178 has finished for PR 13273 at commit
|
|
retest this please |
|
Test build #59179 has finished for PR 13273 at commit
|
|
test this please |
|
Test build #59205 has finished for PR 13273 at commit
|
|
Thank you for fixing it! |
|
LGTM |
| val line = l.trim() | ||
| val skip = lastLine.startsWith("/*") && lastLine.endsWith("*/") && | ||
| line.startsWith("/*") && line.endsWith("*/") && | ||
| map(lastLine).substring(3).contains(map(line).substring(3)) |
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.
The previous one doesn't handle the case that the line is not in the comments map.
|
Test build #59210 has finished for PR 13273 at commit
|
|
Test build #59219 has finished for PR 13273 at commit
|
|
retest this please |
|
Test build #59220 has finished for PR 13273 at commit
|
| m => code.comment.getOrElse(m.group(1), m.group(0))) | ||
| formatter.addLine(comment) | ||
| } | ||
| formatter.result() |
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.
Thanks, SGTM!
|
Test build #59230 has finished for PR 13273 at commit
|
|
retest this please |
|
Test build #59231 has finished for PR 13273 at commit
|
|
Test build #59242 has finished for PR 13273 at commit
|
|
Merging to master and branch-2.0. |
## What changes were proposed in this pull request? This PR fixes 3 slow tests: 1. `ParquetQuerySuite.read/write wide table`: This is not a good unit test as it runs more than 5 minutes. This PR removes it and add a new regression test in `CodeGenerationSuite`, which is more "unit". 2. `ParquetQuerySuite.returning batch for wide table`: reduce the threshold and use smaller data size. 3. `DatasetSuite.SPARK-14554: Dataset.map may generate wrong java code for wide table`: Improve `CodeFormatter.format`(introduced at #12979) can dramatically speed this it up. ## How was this patch tested? N/A Author: Wenchen Fan <[email protected]> Closes #13273 from cloud-fan/test. (cherry picked from commit 50b660d) Signed-off-by: Cheng Lian <[email protected]>
What changes were proposed in this pull request?
This PR fixes 3 slow tests:
ParquetQuerySuite.read/write wide table: This is not a good unit test as it runs more than 5 minutes. This PR removes it and add a new regression test inCodeGenerationSuite, which is more "unit".ParquetQuerySuite.returning batch for wide table: reduce the threshold and use smaller data size.DatasetSuite.SPARK-14554: Dataset.map may generate wrong java code for wide table: ImproveCodeFormatter.format(introduced at [SPARK-15165][SPARK-15205][SQL] Introduce place holder for comments in generated code #12979) can dramatically speed this it up.How was this patch tested?
N/A