-
Notifications
You must be signed in to change notification settings - Fork 28k
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
[SPARK-14441] [SQL] Consolidate DDL tests #12347
Conversation
@@ -113,10 +244,10 @@ class HiveDDLCommandSuite extends PlanTest { | |||
|
|||
val (desc, exists) = extractTableDesc(s2) | |||
assert(exists) | |||
assert(desc.identifier.database == Some("mydb")) | |||
assert(desc.identifier.database.contains("mydb")) |
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.
All these similar changes will break the Scala 2.10 build
See my PR: #12201 |
To be honest, I do not know why we need to merge these test case files. Their purposes are different. One is to verify the parsers; another is to verify the execution of DDL/commands. In the future, we might add more test cases to both files. The files will grow bigger and bigger. |
Test build #55680 has finished for PR 12347 at commit
|
@gatorsmile that's a good point. I think a better goal of the issue is to make the tests consistent and make sure the functionality of the test suites are clearly isolated. I don't think just literally merging all the test files together is a great idea. @bomeng also we should wait for all the other DDLs tasks have finished before we start working on this one. Otherwise there will be a lot of conflicts and the later PRs will still put them in the wrong places. I would like to do this myself after we finish all the tasks. There are a lot of inconsistencies that need to be resolved. It would be best if you can work on the other DDL tasks instead. |
Ok, not a problem. Thanks. |
Yea the current tests are pretty scattered and they are way too big to merge into a single one. Can you just close this pull request? Thanks. |
closing this PR. thanks. |
What changes were proposed in this pull request?
Today we have
DDLSuite
,DDLCommandSuite
,HiveDDLCommandSuite
andHiveDDLSuite
. In this PR, I am trying to consolidate the files as much as possible. Two files are left for now, since it is good to put Hive related test suite in the Hive package.Along with the combination, I also did some modification of current codes mainly in order to improve the codings, here is the summary:
.contains(...)
instead== Some(...)
for Options, this method is introduced in Scala 2.11 and it is recommended method to use for this purpose;->
, instead of 2 elements tuple;isEmpty()
instead of== None
private
to the parser and narrow the scope of implicit (put inside one of the tests);How was this patch tested?
I did not change the logic of any tests, just move around and improve the codes, so existing test cases should remain same.