-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-33789][SQL][TESTS] Refactor unified V1 and V2 datasource tests #30779
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
...src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala
Outdated
Show resolved
Hide resolved
…/AlterTableDropPartitionSuiteBase.scala Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
|
Test build #132826 has finished for PR 30779 at commit
|
|
Kubernetes integration test starting |
| protected def catalog: String | ||
| trait AlterTableAddPartitionSuiteBase extends QueryTest with DDLCommandTestUtils { | ||
| override val command = "ALTER TABLE .. ADD PARTITION" | ||
| protected def defaultUsing: String |
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.
why we still have it here?
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.
Removed
| protected def version: String | ||
| trait AlterTableDropPartitionSuiteBase extends QueryTest with DDLCommandTestUtils { | ||
| override val command = "ALTER TABLE .. DROP PARTITION" | ||
| protected def catalog: String |
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.
ditto
| super.test(s"$command $version: " + testName, testTags: _*)(testFun) | ||
| } | ||
|
|
||
| protected def withNsTable(ns: String, tableName: String, cat: String = catalog) |
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.
since we are here, shall we make the name clearer? like withNamespaceAndTable
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.
Renamed to withNamespaceAndTable
| protected def version: String | ||
| trait ShowPartitionsSuiteBase extends QueryTest with DDLCommandTestUtils { | ||
| override val command = "SHOW PARTITIONS" | ||
| protected def catalog: String |
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.
ditto
| super.test(s"$command $version: " + testName, testTags: _*)(testFun) | ||
| } | ||
|
|
||
| protected def withNamespaceAndTable(ns: String, tableName: String, cat: String = catalog) |
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.
very nit: the parameter names for namespace and catalog are both very short(ns and cat), we should probably use t to be consistent.
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.
If the build fails, I will change this to re-trigger GA or Jenkins.
|
Test build #132834 has started for PR 30779 at commit |
|
Kubernetes integration test status success |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #132828 has finished for PR 30779 at commit
|
…ified-tests # Conflicts: # sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala # sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala # sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableDropPartitionSuite.scala # sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableDropPartitionSuite.scala
|
@MaxGekk can you fix the conflicts? |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #132860 has finished for PR 30779 at commit
|
|
thanks, merging to master! |
What changes were proposed in this pull request?
test(),withNsTable()andcheckPartitions()toDDLCommandTestUtils.version,catalog,defaultUsing,sparkConftoCommandSuiteBase.Why are the changes needed?
To improve code maintenance of the unified tests.
Does this PR introduce any user-facing change?
No
How was this patch tested?
By running the affected test suites: