-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-37031][SQL][TESTS] Unify v1 and v2 DESCRIBE NAMESPACE tests #34305
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
|
Kubernetes integration test starting |
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DescribeNamespaceSuiteBase.scala
Outdated
Show resolved
Hide resolved
|
Kubernetes integration test status failure |
|
Test build #144332 has finished for PR 34305 at commit
|
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DescribeNamespaceSuiteBase.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DescribeNamespaceSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DescribeNamespaceSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DescribeNamespaceSuiteBase.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/DescribeNamespaceSuite.scala
Outdated
Show resolved
Hide resolved
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #144568 has finished for PR 34305 at commit
|
|
|
||
| assert(message.contains(s"$notFoundMsgPrefix '$ns' not found")) | ||
|
|
||
| sql(s"DROP NAMESPACE IF EXISTS $catalog.$ns") |
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.
We don't need to test DROP NAMESPACE 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.
This is testing whether IF EXISTS is respected when the namespace doesn't exist (existing test). Do we still want to remove 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.
Well, it should belong to DropNamespaceSuite if we have one.
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 seems we don't have existing tests cover this case. Let's add it back with a TODO to move it to DropNameSpaceSuite in the future when we have one.
| test("describe namespace") { | ||
| val sql1 = "DESCRIBE NAMESPACE EXTENDED a.b" | ||
| val sql2 = "DESCRIBE NAMESPACE a.b" | ||
| val sql3 = "DESCRIBE NAMESPACE cat.`database`" |
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.
let's test that DESCRIBE DATABASE, DESCRIBE SCHEMA also work
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DescribeNamespaceSuiteBase.scala
Show resolved
Hide resolved
…/DescribeNamespaceSuiteBase.scala
|
Test build #144583 has finished for PR 34305 at commit
|
|
Kubernetes integration test unable to build dist. exiting with code: 1 |
|
Test build #144595 has started for PR 34305 at commit |
|
retest this please |
|
Test build #144624 has started for PR 34305 at commit |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
GA shows tests are passing: https://github.com/imback82/spark-4/actions/runs/1382032814 |
|
thanks, merging to master! |
### What changes were proposed in this pull request? 1. Move SHOW TBLPROPERTIES parsing tests to `ShowTblPropertiesParserSuite`. 2. Define the class `command.ShowTblPropertiesSuiteBase` that is parent of `v1.ShowTblPropertiesSuiteBase` and `v2.ShowTblPropertiesSuite`. 3. Define the class `v1.ShowTblPropertiesSuiteBase` that is parent of `v1.ShowTblPropertiesSuite` and `hive.execution.command.ShowTblPropertiesSuite`. 4. move test case from `DataSourceV2SQLSessionCatalogSuite` to `command.ShowTblPropertiesSuiteBase` to run for V2/V1/HIVE V1 5. move some test case from `HiveCommandSuite` to `command.ShowTblPropertiesSuiteBase` 6. move some test case from `HiveCommandSuite` to `v1.ShowTblPropertiesSuiteBase ` to run for V1/HIVE V1 7. Add two test case for `v1.ShowTblPropertiesSuite ` for view. The changes follow the approach of [#30287](#30287) [#34305](#34305) ### Why are the changes needed? 1. The unification will allow to run common `SHOW TBLPROPERTIES` tests for both DSv1/Hive DSv1 and DSv2 2. We can detect missing features and differences between DSv1 and DSv2 implementations. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? By running v1/v2 and Hive v1 ShowTblPropertiesSuite: $ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *ShowTblPropertiesSuite" Closes #34476 from Peng-Lei/SPARK-37195. Authored-by: PengLei <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
### What changes were proposed in this pull request?
unify test case:
1. Move the testcase from `DDLParserSuite.scala` to `ShowCreateTableParserSuite.scala`.
2. Move the testcase from `DataSourceV2SQLSuite` to `v2.ShowCreateTableSuite`.
If the test case also work with V1/Hive, then move to ShowCreateTableSuiteBase
3. Move the testcase from `sql/ShowCreateTableSuite.scala` to `v1.ShowCreateTableSuite`
If the test case also work with Hive, then move to `v1.ShowCreateTableSuiteBase`
If the test case also work with V2/Hive, then move to `ShowCreateTableSuiteBase`
4. Move the testcase from `HiveShowCreateTableSuite` to `hive.ShowCreateTableSuite`
If the test case also work with V1/V2, then move to `ShowCreateTableSuiteBase`
If the test case also work with V1, then move to `v1.ShowCreateTableSuiteBase`
5. Use `getShowCreateDDL` instead of `checkCreateTable` to check the result.
fix diff behavior:
1. Add one space after `create table xxx` for the command `SHOW CREATE TABLE AS SERDE` to unify the output.
2. Add one space after `OPTIONS` for v2 command `SHOW CREATE TABLE` to unify the output.
The changes follow the approach of [#30287](#30287) [#34305](#34305)
### Why are the changes needed?
1. The unification will allow to run common `SHOW CREATE TABLE` tests for both DSv1/Hive DSv1 and DSv2
2. We can detect missing features and differences between DSv1 and DSv2 implementations.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
$ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *ShowCreateTableSuite"
Closes #34719 from Peng-Lei/SPARK-37381.
Authored-by: PengLei <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
### What changes were proposed in this pull request?
unify test case:
1. Move the testcase from `DDLParserSuite.scala` to `ShowCreateTableParserSuite.scala`.
2. Move the testcase from `DataSourceV2SQLSuite` to `v2.ShowCreateTableSuite`.
If the test case also work with V1/Hive, then move to ShowCreateTableSuiteBase
3. Move the testcase from `sql/ShowCreateTableSuite.scala` to `v1.ShowCreateTableSuite`
If the test case also work with Hive, then move to `v1.ShowCreateTableSuiteBase`
If the test case also work with V2/Hive, then move to `ShowCreateTableSuiteBase`
4. Move the testcase from `HiveShowCreateTableSuite` to `hive.ShowCreateTableSuite`
If the test case also work with V1/V2, then move to `ShowCreateTableSuiteBase`
If the test case also work with V1, then move to `v1.ShowCreateTableSuiteBase`
5. Use `getShowCreateDDL` instead of `checkCreateTable` to check the result.
fix diff behavior:
1. Add one space after `create table xxx` for the command `SHOW CREATE TABLE AS SERDE` to unify the output.
2. Add one space after `OPTIONS` for v2 command `SHOW CREATE TABLE` to unify the output.
The changes follow the approach of [apache#30287](apache#30287) [apache#34305](apache#34305)
### Why are the changes needed?
1. The unification will allow to run common `SHOW CREATE TABLE` tests for both DSv1/Hive DSv1 and DSv2
2. We can detect missing features and differences between DSv1 and DSv2 implementations.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
$ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly *ShowCreateTableSuite"
Closes apache#34719 from Peng-Lei/SPARK-37381.
Authored-by: PengLei <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
DESCRIBE DATABASE/NAMESPACEparsing tests toDescribeNamespaceParserSuite.DESCRIBE NAMESPACEtests into one traitorg.apache.spark.sql.execution.command. DescribeNamespaceSuiteBase, and put datasource specific tests to thev1.DescribeNamespaceSuiteandv2.DescribeNamespaceSuite.The changes follow the approach of #30287.
Why are the changes needed?
DESCRIBE NAMESPACEtests for both DSv1/Hive DSv1 and DSv2Does this PR introduce any user-facing change?
No
How was this patch tested?
Existing unit tests and new tests.