-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-29873][SQL][Test][FOLLOWUP] set operations should not escape when regen golden file with --SET --import both specified #26557
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
… file with --SET --import both specified
Test build #113928 has finished for PR 26557 at commit
|
Test build #113930 has finished for PR 26557 at commit
|
Test build #113937 has finished for PR 26557 at commit
|
@@ -285,7 +285,7 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession { | |||
|
|||
// When we are regenerating the golden files, we don't need to set any config as they | |||
// all need to return the same result | |||
if (regenerateGoldenFiles || !isTestWithConfigSets) { | |||
if ((regenerateGoldenFiles && importedTestCaseName.isEmpty) || !isTestWithConfigSets) { |
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.
ah seems we have 2 different kinds of settings now:
- settings that shouldn't change result. We want to generate the golden files without the settings and run tests with settings.
- setting that can change result.
The second one is pretty useful with --import
. We want to run the same queries with different settings and save the answers.
Shall we have different directives for them? @maropu
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.
After a second thought, we only expect the --SET
to change behavior if we import queries. So the change here LGTM.
@yaooqinn can you update the comment to explain it?
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.
BTW now --SET
is upper case and --import
is lower case. Seems better to always use upper case.
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.
also cc @wangyum , why do we need isTestWithConfigSets
for thriftserver tests?
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.
OK, I will update the comments and change case for --import
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.
@cloud-fan To reduce the test time. The mvn
test often timed out at that time: https://amplab.cs.berkeley.edu/jenkins/job/spark-master-test-maven-hadoop-2.7/
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.
do you mean setting config is expensive?
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 run configSets
times:
spark/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
Lines 287 to 298 in ec5d698
configSets.foreach { configSet => | |
try { | |
runQueries(queries, testCase, Some(configSet)) | |
} catch { | |
case e: Throwable => | |
val configs = configSet.map { | |
case (k, v) => s"$k=$v" | |
} | |
logError(s"Error using configs: ${configs.mkString(",")}") | |
throw e | |
} | |
} |
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.
ah that's a problem. We should think about how to reduce test time.
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.
Oh, I'm late. The change looks reasonable...
Test build #114006 has finished for PR 26557 at commit
|
Test build #114007 has finished for PR 26557 at commit
|
thanks, merging to master! |
late LGTM |
What changes were proposed in this pull request?
When regenerating golden files, the set operations via
--SET
will not be done, but those with --import should be exceptions because we need the set command.Why are the changes needed?
fix test tool.
Does this PR introduce any user-facing change?
How was this patch tested?
add ut, but I'm not sure we need these tests for tests itself.
cc @maropu @cloud-fan