From de367cc9137a7710bc0883a5a36e107f3acff45f Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Fri, 25 Dec 2020 14:11:58 +0300 Subject: [PATCH 01/13] Add comments for CommandSuiteBase --- .../sql/execution/command/v1/CommandSuiteBase.scala | 10 ++++++++-- .../sql/execution/command/v2/CommandSuiteBase.scala | 13 ++++++++++--- .../hive/execution/command/CommandSuiteBase.scala | 10 ++++++++-- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/CommandSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/CommandSuiteBase.scala index 323f9c9365a1..81bf2145c16e 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/CommandSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/CommandSuiteBase.scala @@ -20,8 +20,14 @@ package org.apache.spark.sql.execution.command.v1 import org.apache.spark.sql.connector.catalog.CatalogManager import org.apache.spark.sql.test.SharedSparkSession +/** + * The trait contains settings and utility functions. It can be mixed to the test suites for + * datasource v1 In-Memory catalog. This trait complements the common trait + * [[org.apache.spark.sql.execution.command.DDLCommandTestUtils]] with utility functions and + * settings for all unified datasource V1 and V2 test suites. + */ trait CommandSuiteBase extends SharedSparkSession { - def version: String = "V1" + def version: String = "V1" // The prefix is added to test names def catalog: String = CatalogManager.SESSION_CATALOG_NAME - def defaultUsing: String = "USING parquet" + def defaultUsing: String = "USING parquet" // The clause is used in creating tables under testing } diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/CommandSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/CommandSuiteBase.scala index b1f6a5b318a3..ce1adcd5d083 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/CommandSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/CommandSuiteBase.scala @@ -21,11 +21,18 @@ import org.apache.spark.SparkConf import org.apache.spark.sql.connector.{InMemoryPartitionTableCatalog, InMemoryTableCatalog} import org.apache.spark.sql.test.SharedSparkSession +/** + * The trait contains settings and utility functions. It can be mixed to the test suites for + * datasource v2 catalogs (in-memory test catalogs). This trait complements the trait + * [[org.apache.spark.sql.execution.command.DDLCommandTestUtils]] with common utility functions + * for all unified datasource V1 and V2 test suites. + */ trait CommandSuiteBase extends SharedSparkSession { - def version: String = "V2" - def catalog: String = "test_catalog" - def defaultUsing: String = "USING _" + def version: String = "V2" // The prefix is added to test names + def catalog: String = "test_catalog" // The default V2 catalog for testing + def defaultUsing: String = "USING _" // The clause is used in creating v2 tables under testing + // V2 catalogs created and used especially for testing override def sparkConf: SparkConf = super.sparkConf .set(s"spark.sql.catalog.$catalog", classOf[InMemoryPartitionTableCatalog].getName) .set(s"spark.sql.catalog.non_part_$catalog", classOf[InMemoryTableCatalog].getName) diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/CommandSuiteBase.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/CommandSuiteBase.scala index 3f603fd6c7dd..dea6b8e51d7b 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/CommandSuiteBase.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/CommandSuiteBase.scala @@ -20,8 +20,14 @@ package org.apache.spark.sql.hive.execution.command import org.apache.spark.sql.connector.catalog.CatalogManager import org.apache.spark.sql.hive.test.TestHiveSingleton +/** + * The trait contains settings and utility functions. It can be mixed to the test suites for + * datasource v1 Hive external catalog. This trait complements the common trait + * [[org.apache.spark.sql.execution.command.DDLCommandTestUtils]] with utility functions and + * settings for all unified datasource V1 and V2 test suites. + */ trait CommandSuiteBase extends TestHiveSingleton { - def version: String = "Hive V1" + def version: String = "Hive V1" // The prefix is added to test names def catalog: String = CatalogManager.SESSION_CATALOG_NAME - def defaultUsing: String = "USING HIVE" + def defaultUsing: String = "USING HIVE" // The clause is used in creating tables under testing } From 1af0c8c43629c7e6a74ae7ef4f203b181c55e864 Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Fri, 25 Dec 2020 15:50:45 +0300 Subject: [PATCH 02/13] Add comments into DDLCommandTestUtils --- .../sql/execution/command/DDLCommandTestUtils.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala index 6ea2fea41f28..3be6a708f165 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala @@ -24,14 +24,26 @@ import org.apache.spark.sql.Row import org.apache.spark.sql.execution.datasources.PartitioningUtils import org.apache.spark.sql.test.SQLTestUtils +/** + * The common settings and utility functions for all v1 and v2 test suites. When a function + * is not applicable to all supported catalogs, it should be placed to a specific trait: + * + * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.CommandSuiteBase]] + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.CommandSuiteBase]] + * - V2 In-Memory catalog: [[org.apache.spark.sql.execution.command.v2.CommandSuiteBase]] + */ trait DDLCommandTestUtils extends SQLTestUtils { // The version of the catalog under testing such as "V1", "V2", "Hive V1". protected def version: String // Name of the command as SQL statement, for instance "SHOW PARTITIONS" protected def command: String + // The catalog name which can be used in SQL statements under testing protected def catalog: String + // The clause is used in creating tables for testing protected def defaultUsing: String + // Overrides the `test` method, and adds a prefix to easily find identify the catalog to which + // the failed test in logs belongs to. override def test(testName: String, testTags: Tag*)(testFun: => Any) (implicit pos: Position): Unit = { super.test(s"$command $version: " + testName, testTags: _*)(testFun) @@ -49,6 +61,7 @@ trait DDLCommandTestUtils extends SQLTestUtils { } } + // Checks that the table `t` contains only the `expected` partitions. protected def checkPartitions(t: String, expected: Map[String, String]*): Unit = { val partitions = sql(s"SHOW PARTITIONS $t") .collect() From 306f97ed5381ecd0c4ec7679abdac53efa8da954 Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Fri, 25 Dec 2020 18:19:29 +0300 Subject: [PATCH 03/13] Comments for common traits --- .../command/AlterTableAddPartitionSuiteBase.scala | 14 ++++++++++++++ .../command/AlterTableDropPartitionSuiteBase.scala | 14 ++++++++++++++ .../AlterTableRenamePartitionSuiteBase.scala | 14 ++++++++++++++ .../sql/execution/command/DropTableSuiteBase.scala | 10 ++++++++++ .../command/ShowPartitionsSuiteBase.scala | 11 +++++++++++ .../execution/command/ShowTablesSuiteBase.scala | 10 ++++++++++ 6 files changed, 73 insertions(+) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala index 1c1d802b991f..35856c4809f5 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala @@ -22,6 +22,20 @@ import org.apache.spark.sql.catalyst.analysis.PartitionsAlreadyExistException import org.apache.spark.sql.catalyst.catalog.CatalogTypes.TablePartitionSpec import org.apache.spark.sql.internal.SQLConf +/** + * This base suite contains unified tests for the `ALTER TABLE .. ADD PARTITION` command that + * check V1 and V2 table catalogs. The tests that cannot run for all supported catalogs are + * located in more specific test suites: + * + * - V2 table catalog tests: + * [[org.apache.spark.sql.execution.command.v2.AlterTableAddPartitionSuite]] + * - V1 table catalog tests: + * [[org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuiteBase]] + * - V1 In-Memory catalog: + * [[org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuite]] + * - V1 Hive External catalog: + * [[org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite]] + */ trait AlterTableAddPartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. ADD PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala index 433f24c75083..4260dc4d3d6f 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala @@ -21,6 +21,20 @@ import org.apache.spark.sql.{AnalysisException, QueryTest} import org.apache.spark.sql.catalyst.analysis.NoSuchPartitionsException import org.apache.spark.sql.internal.SQLConf +/** + * This base suite contains unified tests for the `ALTER TABLE .. DROP PARTITION` command that + * check V1 and V2 table catalogs. The tests that cannot run for all supported catalogs are + * located in more specific test suites: + * + * - V2 table catalog tests: + * [[org.apache.spark.sql.execution.command.v2.AlterTableDropPartitionSuite]] + * - V1 table catalog tests: + * [[org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuiteBase]] + * - V1 In-Memory catalog: + * [[org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuite]] + * - V1 Hive External catalog: + * [[org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite]] + */ trait AlterTableDropPartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. DROP PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala index a29cf6cabba4..ce8fc6f46518 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala @@ -19,6 +19,20 @@ package org.apache.spark.sql.execution.command import org.apache.spark.sql.QueryTest +/** + * This base suite contains unified tests for the `ALTER TABLE .. RENAME PARTITION` command that + * check V1 and V2 table catalogs. The tests that cannot run for all supported catalogs are + * located in more specific test suites: + * + * - V2 table catalog tests: + * [[org.apache.spark.sql.execution.command.v2.AlterTableRenamePartitionSuite]] + * - V1 table catalog tests: + * [[org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuiteBase]] + * - V1 In-Memory catalog: + * [[org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuite]] + * - V1 Hive External catalog: + * [[org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite]] + */ trait AlterTableRenamePartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. RENAME PARTITION" } diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala index 9cba67f04a35..1d9321ba6192 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala @@ -19,6 +19,16 @@ package org.apache.spark.sql.execution.command import org.apache.spark.sql.{AnalysisException, QueryTest, Row} +/** + * This base suite contains unified tests for the `DROP TABLE` command that check V1 and V2 + * table catalogs. The tests that cannot run for all supported catalogs are located in more + * specific test suites: + * + * - V2 table catalog tests: [[org.apache.spark.sql.execution.command.v2.DropTableSuite]] + * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.DropTableSuiteBase]] + * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.DropTableSuite]] + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.DropTableSuite]] + */ trait DropTableSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "DROP TABLE" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala index 83808ab82d3b..e60261315a05 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala @@ -21,6 +21,17 @@ import org.apache.spark.sql.{AnalysisException, QueryTest, Row} import org.apache.spark.sql.internal.SQLConf import org.apache.spark.sql.types.{StringType, StructType} +/** + * This base suite contains unified tests for the `SHOW PARTITIONS` command that check V1 and V2 + * table catalogs. The tests that cannot run for all supported catalogs are located in more + * specific test suites: + * + * - V2 table catalog tests: [[org.apache.spark.sql.execution.command.v2.ShowPartitionsSuite]] + * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuiteBase]] + * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuite]] + * - V1 Hive External catalog: + * [[org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite]] + */ trait ShowPartitionsSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "SHOW PARTITIONS" // Gets the schema of `SHOW PARTITIONS` diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala index 5b729a4eb1c8..a988ac6d4576 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala @@ -23,6 +23,16 @@ import org.apache.spark.sql.connector.catalog.CatalogV2Implicits._ import org.apache.spark.sql.internal.SQLConf import org.apache.spark.sql.types.StructType +/** + * This base suite contains unified tests for the `SHOW TABLES` command that check V1 and V2 + * table catalogs. The tests that cannot run for all supported catalogs are located in more + * specific test suites: + * + * - V2 table catalog tests: [[org.apache.spark.sql.execution.command.v2.ShowTablesSuite]] + * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuiteBase]] + * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuite]] + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowTablesSuite]] + */ trait ShowTablesSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "SHOW TABLES" protected def defaultNamespace: Seq[String] From 82fc4ea863c373af7e0476a0ef33b721733616ca Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Fri, 25 Dec 2020 18:37:51 +0300 Subject: [PATCH 04/13] Comments for common V1 traits --- .../command/v1/AlterTableAddPartitionSuite.scala | 10 ++++++++++ .../command/v1/AlterTableDropPartitionSuite.scala | 10 ++++++++++ .../command/v1/AlterTableRenamePartitionSuite.scala | 10 ++++++++++ .../sql/execution/command/v1/DropTableSuite.scala | 8 ++++++++ .../sql/execution/command/v1/ShowPartitionsSuite.scala | 8 ++++++++ .../sql/execution/command/v1/ShowTablesSuite.scala | 8 ++++++++ 6 files changed, 54 insertions(+) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala index a749b1e3dd14..fdc866c88c15 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala @@ -21,6 +21,16 @@ import org.apache.spark.sql.AnalysisException import org.apache.spark.sql.catalyst.catalog.CatalogTypes.TablePartitionSpec import org.apache.spark.sql.execution.command +/** + * This base suite contains unified tests for the `ALTER TABLE .. ADD PARTITION` command that + * check V1 table catalogs. The tests that cannot run for all V1 catalogs are located in more + * specific test suites: + * + * - V1 In-Memory catalog: + * [[org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuite]] + * - V1 Hive External catalog: + * [[org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite]] + */ trait AlterTableAddPartitionSuiteBase extends command.AlterTableAddPartitionSuiteBase { override protected def checkLocation( t: String, diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala index 71032eefee2b..1dd6f1cdc17e 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala @@ -20,6 +20,16 @@ package org.apache.spark.sql.execution.command.v1 import org.apache.spark.sql.AnalysisException import org.apache.spark.sql.execution.command +/** + * This base suite contains unified tests for the `ALTER TABLE .. DROP PARTITION` command that + * check V1 table catalogs. The tests that cannot run for all V1 catalogs are located in more + * specific test suites: + * + * - V1 In-Memory catalog: + * [[org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuite]] + * - V1 Hive External catalog: + * [[org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite]] + */ trait AlterTableDropPartitionSuiteBase extends command.AlterTableDropPartitionSuiteBase { override protected val notFullPartitionSpecErr = "The following partitions not found in table" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala index 89d5e5f4635d..d6e688a28d89 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala @@ -22,6 +22,16 @@ import org.apache.spark.sql.catalyst.analysis.{NoSuchPartitionException, Partiti import org.apache.spark.sql.execution.command import org.apache.spark.sql.internal.SQLConf +/** + * This base suite contains unified tests for the `ALTER TABLE .. RENAME PARTITION` command that + * check V1 table catalogs. The tests that cannot run for all V1 catalogs are located in more + * specific test suites: + * + * - V1 In-Memory catalog: + * [[org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuite]] + * - V1 Hive External catalog: + * [[org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite]] + */ trait AlterTableRenamePartitionSuiteBase extends command.AlterTableRenamePartitionSuiteBase { protected def createSinglePartTable(t: String): Unit = { sql(s"CREATE TABLE $t (id bigint, data string) $defaultUsing PARTITIONED BY (id)") diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala index 530d18cb6f7b..8927b5619876 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala @@ -19,6 +19,14 @@ package org.apache.spark.sql.execution.command.v1 import org.apache.spark.sql.execution.command +/** + * This base suite contains unified tests for the `DROP TABLE` command that check V1 + * table catalogs. The tests that cannot run for all V1 catalogs are located in more + * specific test suites: + * + * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.DropTableSuite]] + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.DropTableSuite]] + */ trait DropTableSuiteBase extends command.DropTableSuiteBase { test("purge option") { withNamespace(s"$catalog.ns") { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala index 5d992d18890e..6fe6d4186750 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala @@ -20,6 +20,14 @@ package org.apache.spark.sql.execution.command.v1 import org.apache.spark.sql.{AnalysisException, Row, SaveMode} import org.apache.spark.sql.execution.command +/** + * This base suite contains unified tests for the `SHOW PARTITIONS` command that check V1 + * table catalogs. The tests that cannot run for all V1 catalogs are located in more + * specific test suites: + * + * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuite]] + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite]] + */ trait ShowPartitionsSuiteBase extends command.ShowPartitionsSuiteBase { test("show everything in the default database") { val table = "dateTable" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala index 12b4df269e15..47b2bdb9c477 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala @@ -22,6 +22,14 @@ import org.apache.spark.sql.execution.command import org.apache.spark.sql.internal.SQLConf import org.apache.spark.sql.types.{BooleanType, StringType, StructType} +/** + * This base suite contains unified tests for the `SHOW TABLES` command that check V1 + * table catalogs. The tests that cannot run for all V1 catalogs are located in more + * specific test suites: + * + * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuite]] + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowTablesSuite]] + */ trait ShowTablesSuiteBase extends command.ShowTablesSuiteBase { override def defaultNamespace: Seq[String] = Seq("default") override def showSchema: StructType = { From d520989b7e5ece42624ee297e3faa1ae0cdeaca5 Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Fri, 25 Dec 2020 18:43:36 +0300 Subject: [PATCH 05/13] Comments for V2 tests --- .../execution/command/v2/AlterTableAddPartitionSuite.scala | 4 ++++ .../execution/command/v2/AlterTableDropPartitionSuite.scala | 4 ++++ .../execution/command/v2/AlterTableRenamePartitionSuite.scala | 4 ++++ .../spark/sql/execution/command/v2/DropTableSuite.scala | 3 +++ .../spark/sql/execution/command/v2/ShowPartitionsSuite.scala | 3 +++ .../spark/sql/execution/command/v2/ShowTablesSuite.scala | 3 +++ 6 files changed, 21 insertions(+) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableAddPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableAddPartitionSuite.scala index b0d0f6ced934..0f0f8fa38932 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableAddPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableAddPartitionSuite.scala @@ -24,6 +24,10 @@ import org.apache.spark.sql.connector.InMemoryPartitionTable import org.apache.spark.sql.connector.catalog.{CatalogV2Implicits, Identifier} import org.apache.spark.sql.execution.command +/** + * The class contains tests for the `ALTER TABLE .. ADD PARTITION` command + * to check V2 table catalogs. + */ class AlterTableAddPartitionSuite extends command.AlterTableAddPartitionSuiteBase with CommandSuiteBase { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableDropPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableDropPartitionSuite.scala index 97ef10e25651..d6890d6faef7 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableDropPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableDropPartitionSuite.scala @@ -20,6 +20,10 @@ package org.apache.spark.sql.execution.command.v2 import org.apache.spark.sql.AnalysisException import org.apache.spark.sql.execution.command +/** + * The class contains tests for the `ALTER TABLE .. DROP PARTITION` command + * to check V2 table catalogs. + */ class AlterTableDropPartitionSuite extends command.AlterTableDropPartitionSuiteBase with CommandSuiteBase { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableRenamePartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableRenamePartitionSuite.scala index 026f1dcc33a1..d1c252adde36 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableRenamePartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/AlterTableRenamePartitionSuite.scala @@ -20,6 +20,10 @@ package org.apache.spark.sql.execution.command.v2 import org.apache.spark.sql.AnalysisException import org.apache.spark.sql.execution.command +/** + * The class contains tests for the `ALTER TABLE .. RENAME PARTITION` command + * to check V2 table catalogs. + */ class AlterTableRenamePartitionSuite extends command.AlterTableRenamePartitionSuiteBase with CommandSuiteBase { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/DropTableSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/DropTableSuite.scala index a272f649288f..9c9b7d3049c7 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/DropTableSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/DropTableSuite.scala @@ -22,6 +22,9 @@ import org.apache.spark.sql.connector.InMemoryTableSessionCatalog import org.apache.spark.sql.execution.command import org.apache.spark.sql.internal.SQLConf.V2_SESSION_CATALOG_IMPLEMENTATION +/** + * The class contains tests for the `DROP TABLE` command to check V2 table catalogs. + */ class DropTableSuite extends command.DropTableSuiteBase with CommandSuiteBase { test("purge option") { withNamespaceAndTable("ns", "tbl") { t => diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/ShowPartitionsSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/ShowPartitionsSuite.scala index 431f64baf4b7..44d8b57ce159 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/ShowPartitionsSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/ShowPartitionsSuite.scala @@ -20,6 +20,9 @@ package org.apache.spark.sql.execution.command.v2 import org.apache.spark.sql.{AnalysisException, Row, SaveMode} import org.apache.spark.sql.execution.command +/** + * The class contains tests for the `SHOW PARTITIONS` command to check V2 table catalogs. + */ class ShowPartitionsSuite extends command.ShowPartitionsSuiteBase with CommandSuiteBase { test("a table does not support partitioning") { val table = s"non_part_$catalog.tab1" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/ShowTablesSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/ShowTablesSuite.scala index cef5eac703ee..6a9a9399b956 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/ShowTablesSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/ShowTablesSuite.scala @@ -21,6 +21,9 @@ import org.apache.spark.sql.{AnalysisException, Row} import org.apache.spark.sql.execution.command import org.apache.spark.sql.types.{StringType, StructType} +/** + * The class contains tests for the `SHOW TABLES` command to check V2 table catalogs. + */ class ShowTablesSuite extends command.ShowTablesSuiteBase with CommandSuiteBase { override def defaultNamespace: Seq[String] = Nil override def showSchema: StructType = { From 9a59105fdefc560d54420fcea024099d499f5fef Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Fri, 25 Dec 2020 18:46:42 +0300 Subject: [PATCH 06/13] Comments for V1 in-memory catalog tests --- .../execution/command/v1/AlterTableAddPartitionSuite.scala | 4 ++++ .../execution/command/v1/AlterTableDropPartitionSuite.scala | 4 ++++ .../execution/command/v1/AlterTableRenamePartitionSuite.scala | 4 ++++ .../spark/sql/execution/command/v1/DropTableSuite.scala | 3 +++ .../spark/sql/execution/command/v1/ShowPartitionsSuite.scala | 3 +++ .../spark/sql/execution/command/v1/ShowTablesSuite.scala | 3 +++ 6 files changed, 21 insertions(+) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala index fdc866c88c15..7e6393d9ab68 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala @@ -59,4 +59,8 @@ trait AlterTableAddPartitionSuiteBase extends command.AlterTableAddPartitionSuit } } +/** + * The class contains tests for the `ALTER TABLE .. ADD PARTITION` command to check + * V1 In-Memory table catalog. + */ class AlterTableAddPartitionSuite extends AlterTableAddPartitionSuiteBase with CommandSuiteBase diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala index 1dd6f1cdc17e..1da63e788d4b 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala @@ -44,6 +44,10 @@ trait AlterTableDropPartitionSuiteBase extends command.AlterTableDropPartitionSu } } +/** + * The class contains tests for the `ALTER TABLE .. DROP PARTITION` command to check + * V1 In-Memory table catalog. + */ class AlterTableDropPartitionSuite extends AlterTableDropPartitionSuiteBase with CommandSuiteBase { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala index d6e688a28d89..faddd3e3e6b0 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala @@ -174,6 +174,10 @@ trait AlterTableRenamePartitionSuiteBase extends command.AlterTableRenamePartiti } } +/** + * The class contains tests for the `ALTER TABLE .. RENAME PARTITION` command to check + * V1 In-Memory table catalog. + */ class AlterTableRenamePartitionSuite extends AlterTableRenamePartitionSuiteBase with CommandSuiteBase diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala index 8927b5619876..463eb16c2a1b 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala @@ -41,5 +41,8 @@ trait DropTableSuiteBase extends command.DropTableSuiteBase { } } +/** + * The class contains tests for the `DROP TABLE` command to check V1 In-Memory table catalog. + */ class DropTableSuite extends DropTableSuiteBase with CommandSuiteBase diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala index 6fe6d4186750..67b27052925a 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala @@ -71,6 +71,9 @@ trait ShowPartitionsSuiteBase extends command.ShowPartitionsSuiteBase { } } +/** + * The class contains tests for the `SHOW PARTITIONS` command to check V1 In-Memory table catalog. + */ class ShowPartitionsSuite extends ShowPartitionsSuiteBase with CommandSuiteBase { // The test is placed here because it fails with `USING HIVE`: // org.apache.spark.sql.AnalysisException: diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala index 47b2bdb9c477..657af41d4f45 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala @@ -110,6 +110,9 @@ trait ShowTablesSuiteBase extends command.ShowTablesSuiteBase { } } +/** + * The class contains tests for the `SHOW TABLES` command to check V1 In-Memory table catalog. + */ class ShowTablesSuite extends ShowTablesSuiteBase with CommandSuiteBase { test("SPARK-33670: show partitions from a datasource table") { import testImplicits._ From 0a8a0b8a9db93d68e56ee93ba53508f80c8989cc Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Fri, 25 Dec 2020 18:49:52 +0300 Subject: [PATCH 07/13] Comments for V1 Hive catalog tests --- .../hive/execution/command/AlterTableAddPartitionSuite.scala | 4 ++++ .../hive/execution/command/AlterTableDropPartitionSuite.scala | 4 ++++ .../execution/command/AlterTableRenamePartitionSuite.scala | 4 ++++ .../spark/sql/hive/execution/command/DropTableSuite.scala | 3 +++ .../sql/hive/execution/command/ShowPartitionsSuite.scala | 4 ++++ .../spark/sql/hive/execution/command/ShowTablesSuite.scala | 3 +++ 6 files changed, 22 insertions(+) diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableAddPartitionSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableAddPartitionSuite.scala index 2a996c3f4690..f8fe23f643cd 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableAddPartitionSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableAddPartitionSuite.scala @@ -19,6 +19,10 @@ package org.apache.spark.sql.hive.execution.command import org.apache.spark.sql.execution.command.v1 +/** + * The class contains tests for the `ALTER TABLE .. ADD PARTITION` command to check + * V1 Hive external table catalog. + */ class AlterTableAddPartitionSuite extends v1.AlterTableAddPartitionSuiteBase with CommandSuiteBase diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableDropPartitionSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableDropPartitionSuite.scala index a4f9ab0b0433..5cac27f0d254 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableDropPartitionSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableDropPartitionSuite.scala @@ -19,6 +19,10 @@ package org.apache.spark.sql.hive.execution.command import org.apache.spark.sql.execution.command.v1 +/** + * The class contains tests for the `ALTER TABLE .. DROP PARTITION` command to check + * V1 Hive external table catalog. + */ class AlterTableDropPartitionSuite extends v1.AlterTableDropPartitionSuiteBase with CommandSuiteBase diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableRenamePartitionSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableRenamePartitionSuite.scala index 86edab74ab99..5cd5122a2a7f 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableRenamePartitionSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/AlterTableRenamePartitionSuite.scala @@ -19,6 +19,10 @@ package org.apache.spark.sql.hive.execution.command import org.apache.spark.sql.execution.command.v1 +/** + * The class contains tests for the `ALTER TABLE .. RENAME PARTITION` command to check + * V1 Hive external table catalog. + */ class AlterTableRenamePartitionSuite extends v1.AlterTableRenamePartitionSuiteBase with CommandSuiteBase diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/DropTableSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/DropTableSuite.scala index b2a404d7206a..c1f17d128064 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/DropTableSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/DropTableSuite.scala @@ -19,4 +19,7 @@ package org.apache.spark.sql.hive.execution.command import org.apache.spark.sql.execution.command.v1 +/** + * The class contains tests for the `DROP TABLE` command to check V1 Hive external table catalog. + */ class DropTableSuite extends v1.DropTableSuiteBase with CommandSuiteBase diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/ShowPartitionsSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/ShowPartitionsSuite.scala index eaac8f5e8146..904c6c40b938 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/ShowPartitionsSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/ShowPartitionsSuite.scala @@ -20,6 +20,10 @@ package org.apache.spark.sql.hive.execution.command import org.apache.spark.sql.{Row, SaveMode} import org.apache.spark.sql.execution.command.v1 +/** + * The class contains tests for the `SHOW PARTITIONS` command to check + * V1 Hive external table catalog. + */ class ShowPartitionsSuite extends v1.ShowPartitionsSuiteBase with CommandSuiteBase { test("null and empty string as partition values") { import testImplicits._ diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/ShowTablesSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/ShowTablesSuite.scala index 8c00b3fe7f7c..7b3652a86034 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/ShowTablesSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/ShowTablesSuite.scala @@ -19,4 +19,7 @@ package org.apache.spark.sql.hive.execution.command import org.apache.spark.sql.execution.command.v1 +/** + * The class contains tests for the `SHOW TABLES` command to check V1 Hive external table catalog. + */ class ShowTablesSuite extends v1.ShowTablesSuiteBase with CommandSuiteBase From 0b557b2481dd6357271cf4ec78d7dd029b022099 Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Sat, 26 Dec 2020 11:06:16 +0300 Subject: [PATCH 08/13] Trigger build From af4d508e4ae951e8df4a4adb67d396293a28a59d Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Sat, 26 Dec 2020 17:33:49 +0300 Subject: [PATCH 09/13] Avoid refs to the hive package --- .../sql/execution/command/AlterTableAddPartitionSuiteBase.scala | 2 +- .../execution/command/AlterTableDropPartitionSuiteBase.scala | 2 +- .../execution/command/AlterTableRenamePartitionSuiteBase.scala | 2 +- .../spark/sql/execution/command/DDLCommandTestUtils.scala | 2 +- .../apache/spark/sql/execution/command/DropTableSuiteBase.scala | 2 +- .../spark/sql/execution/command/ShowPartitionsSuiteBase.scala | 2 +- .../spark/sql/execution/command/ShowTablesSuiteBase.scala | 2 +- .../sql/execution/command/v1/AlterTableAddPartitionSuite.scala | 2 +- .../sql/execution/command/v1/AlterTableDropPartitionSuite.scala | 2 +- .../execution/command/v1/AlterTableRenamePartitionSuite.scala | 2 +- .../apache/spark/sql/execution/command/v1/DropTableSuite.scala | 2 +- .../spark/sql/execution/command/v1/ShowPartitionsSuite.scala | 2 +- .../apache/spark/sql/execution/command/v1/ShowTablesSuite.scala | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala index 35856c4809f5..fde523584492 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala @@ -34,7 +34,7 @@ import org.apache.spark.sql.internal.SQLConf * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuite]] * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite` */ trait AlterTableAddPartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. ADD PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala index 4260dc4d3d6f..26ca8cf583c6 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala @@ -33,7 +33,7 @@ import org.apache.spark.sql.internal.SQLConf * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuite]] * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite` */ trait AlterTableDropPartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. DROP PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala index ce8fc6f46518..1b898bc1f50e 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala @@ -31,7 +31,7 @@ import org.apache.spark.sql.QueryTest * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuite]] * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite` */ trait AlterTableRenamePartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. RENAME PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala index 3be6a708f165..f78668edaa05 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala @@ -29,7 +29,7 @@ import org.apache.spark.sql.test.SQLTestUtils * is not applicable to all supported catalogs, it should be placed to a specific trait: * * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.CommandSuiteBase]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.CommandSuiteBase]] + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.CommandSuiteBase` * - V2 In-Memory catalog: [[org.apache.spark.sql.execution.command.v2.CommandSuiteBase]] */ trait DDLCommandTestUtils extends SQLTestUtils { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala index 1d9321ba6192..0f325a378bc3 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala @@ -27,7 +27,7 @@ import org.apache.spark.sql.{AnalysisException, QueryTest, Row} * - V2 table catalog tests: [[org.apache.spark.sql.execution.command.v2.DropTableSuite]] * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.DropTableSuiteBase]] * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.DropTableSuite]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.DropTableSuite]] + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.DropTableSuite` */ trait DropTableSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "DROP TABLE" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala index e60261315a05..6e6482fb5977 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala @@ -30,7 +30,7 @@ import org.apache.spark.sql.types.{StringType, StructType} * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuiteBase]] * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuite]] * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite]] + * `org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite` */ trait ShowPartitionsSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "SHOW PARTITIONS" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala index a988ac6d4576..9ea6002736f4 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala @@ -31,7 +31,7 @@ import org.apache.spark.sql.types.StructType * - V2 table catalog tests: [[org.apache.spark.sql.execution.command.v2.ShowTablesSuite]] * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuiteBase]] * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuite]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowTablesSuite]] + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.ShowTablesSuite` */ trait ShowTablesSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "SHOW TABLES" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala index 7e6393d9ab68..efe9e43f2c5b 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala @@ -29,7 +29,7 @@ import org.apache.spark.sql.execution.command * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuite]] * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite` */ trait AlterTableAddPartitionSuiteBase extends command.AlterTableAddPartitionSuiteBase { override protected def checkLocation( diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala index 1da63e788d4b..8428a8aa9eef 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala @@ -28,7 +28,7 @@ import org.apache.spark.sql.execution.command * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuite]] * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite` */ trait AlterTableDropPartitionSuiteBase extends command.AlterTableDropPartitionSuiteBase { override protected val notFullPartitionSpecErr = "The following partitions not found in table" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala index faddd3e3e6b0..7341124e2d1c 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala @@ -30,7 +30,7 @@ import org.apache.spark.sql.internal.SQLConf * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuite]] * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite` */ trait AlterTableRenamePartitionSuiteBase extends command.AlterTableRenamePartitionSuiteBase { protected def createSinglePartTable(t: String): Unit = { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala index 463eb16c2a1b..eff73cb0f441 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala @@ -25,7 +25,7 @@ import org.apache.spark.sql.execution.command * specific test suites: * * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.DropTableSuite]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.DropTableSuite]] + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.DropTableSuite` */ trait DropTableSuiteBase extends command.DropTableSuiteBase { test("purge option") { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala index 67b27052925a..8dba76f7d4e2 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala @@ -26,7 +26,7 @@ import org.apache.spark.sql.execution.command * specific test suites: * * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuite]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite]] + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite` */ trait ShowPartitionsSuiteBase extends command.ShowPartitionsSuiteBase { test("show everything in the default database") { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala index 657af41d4f45..b164f13acdb0 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala @@ -28,7 +28,7 @@ import org.apache.spark.sql.types.{BooleanType, StringType, StructType} * specific test suites: * * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuite]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowTablesSuite]] + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.ShowTablesSuite` */ trait ShowTablesSuiteBase extends command.ShowTablesSuiteBase { override def defaultNamespace: Seq[String] = Seq("default") From ad96a4d00759859746f26f38e97dbc8128123b73 Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Sat, 26 Dec 2020 18:01:44 +0300 Subject: [PATCH 10/13] Revert "Avoid refs to the hive package" This reverts commit af4d508e4ae951e8df4a4adb67d396293a28a59d. --- .../sql/execution/command/AlterTableAddPartitionSuiteBase.scala | 2 +- .../execution/command/AlterTableDropPartitionSuiteBase.scala | 2 +- .../execution/command/AlterTableRenamePartitionSuiteBase.scala | 2 +- .../spark/sql/execution/command/DDLCommandTestUtils.scala | 2 +- .../apache/spark/sql/execution/command/DropTableSuiteBase.scala | 2 +- .../spark/sql/execution/command/ShowPartitionsSuiteBase.scala | 2 +- .../spark/sql/execution/command/ShowTablesSuiteBase.scala | 2 +- .../sql/execution/command/v1/AlterTableAddPartitionSuite.scala | 2 +- .../sql/execution/command/v1/AlterTableDropPartitionSuite.scala | 2 +- .../execution/command/v1/AlterTableRenamePartitionSuite.scala | 2 +- .../apache/spark/sql/execution/command/v1/DropTableSuite.scala | 2 +- .../spark/sql/execution/command/v1/ShowPartitionsSuite.scala | 2 +- .../apache/spark/sql/execution/command/v1/ShowTablesSuite.scala | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala index fde523584492..35856c4809f5 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala @@ -34,7 +34,7 @@ import org.apache.spark.sql.internal.SQLConf * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuite]] * - V1 Hive External catalog: - * `org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite` + * [[org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite]] */ trait AlterTableAddPartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. ADD PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala index 26ca8cf583c6..4260dc4d3d6f 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala @@ -33,7 +33,7 @@ import org.apache.spark.sql.internal.SQLConf * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuite]] * - V1 Hive External catalog: - * `org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite` + * [[org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite]] */ trait AlterTableDropPartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. DROP PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala index 1b898bc1f50e..ce8fc6f46518 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala @@ -31,7 +31,7 @@ import org.apache.spark.sql.QueryTest * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuite]] * - V1 Hive External catalog: - * `org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite` + * [[org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite]] */ trait AlterTableRenamePartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. RENAME PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala index f78668edaa05..3be6a708f165 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala @@ -29,7 +29,7 @@ import org.apache.spark.sql.test.SQLTestUtils * is not applicable to all supported catalogs, it should be placed to a specific trait: * * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.CommandSuiteBase]] - * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.CommandSuiteBase` + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.CommandSuiteBase]] * - V2 In-Memory catalog: [[org.apache.spark.sql.execution.command.v2.CommandSuiteBase]] */ trait DDLCommandTestUtils extends SQLTestUtils { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala index 0f325a378bc3..1d9321ba6192 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala @@ -27,7 +27,7 @@ import org.apache.spark.sql.{AnalysisException, QueryTest, Row} * - V2 table catalog tests: [[org.apache.spark.sql.execution.command.v2.DropTableSuite]] * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.DropTableSuiteBase]] * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.DropTableSuite]] - * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.DropTableSuite` + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.DropTableSuite]] */ trait DropTableSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "DROP TABLE" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala index 6e6482fb5977..e60261315a05 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala @@ -30,7 +30,7 @@ import org.apache.spark.sql.types.{StringType, StructType} * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuiteBase]] * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuite]] * - V1 Hive External catalog: - * `org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite` + * [[org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite]] */ trait ShowPartitionsSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "SHOW PARTITIONS" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala index 9ea6002736f4..a988ac6d4576 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala @@ -31,7 +31,7 @@ import org.apache.spark.sql.types.StructType * - V2 table catalog tests: [[org.apache.spark.sql.execution.command.v2.ShowTablesSuite]] * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuiteBase]] * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuite]] - * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.ShowTablesSuite` + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowTablesSuite]] */ trait ShowTablesSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "SHOW TABLES" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala index efe9e43f2c5b..7e6393d9ab68 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala @@ -29,7 +29,7 @@ import org.apache.spark.sql.execution.command * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuite]] * - V1 Hive External catalog: - * `org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite` + * [[org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite]] */ trait AlterTableAddPartitionSuiteBase extends command.AlterTableAddPartitionSuiteBase { override protected def checkLocation( diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala index 8428a8aa9eef..1da63e788d4b 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala @@ -28,7 +28,7 @@ import org.apache.spark.sql.execution.command * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuite]] * - V1 Hive External catalog: - * `org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite` + * [[org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite]] */ trait AlterTableDropPartitionSuiteBase extends command.AlterTableDropPartitionSuiteBase { override protected val notFullPartitionSpecErr = "The following partitions not found in table" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala index 7341124e2d1c..faddd3e3e6b0 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala @@ -30,7 +30,7 @@ import org.apache.spark.sql.internal.SQLConf * - V1 In-Memory catalog: * [[org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuite]] * - V1 Hive External catalog: - * `org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite` + * [[org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite]] */ trait AlterTableRenamePartitionSuiteBase extends command.AlterTableRenamePartitionSuiteBase { protected def createSinglePartTable(t: String): Unit = { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala index eff73cb0f441..463eb16c2a1b 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala @@ -25,7 +25,7 @@ import org.apache.spark.sql.execution.command * specific test suites: * * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.DropTableSuite]] - * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.DropTableSuite` + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.DropTableSuite]] */ trait DropTableSuiteBase extends command.DropTableSuiteBase { test("purge option") { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala index 8dba76f7d4e2..67b27052925a 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala @@ -26,7 +26,7 @@ import org.apache.spark.sql.execution.command * specific test suites: * * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuite]] - * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite` + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite]] */ trait ShowPartitionsSuiteBase extends command.ShowPartitionsSuiteBase { test("show everything in the default database") { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala index b164f13acdb0..657af41d4f45 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala @@ -28,7 +28,7 @@ import org.apache.spark.sql.types.{BooleanType, StringType, StructType} * specific test suites: * * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuite]] - * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.ShowTablesSuite` + * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowTablesSuite]] */ trait ShowTablesSuiteBase extends command.ShowTablesSuiteBase { override def defaultNamespace: Seq[String] = Seq("default") From 494b0203f02715f7cd0895b7d2ca1ff18244070f Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Sun, 27 Dec 2020 12:43:39 +0300 Subject: [PATCH 11/13] Replace [[ and ]] by ` --- .../command/AlterTableAddPartitionSuiteBase.scala | 8 ++++---- .../command/AlterTableDropPartitionSuiteBase.scala | 8 ++++---- .../command/AlterTableRenamePartitionSuiteBase.scala | 8 ++++---- .../spark/sql/execution/command/DropTableSuiteBase.scala | 8 ++++---- .../sql/execution/command/ShowPartitionsSuiteBase.scala | 8 ++++---- .../spark/sql/execution/command/ShowTablesSuiteBase.scala | 8 ++++---- .../command/v1/AlterTableAddPartitionSuite.scala | 4 ++-- .../command/v1/AlterTableDropPartitionSuite.scala | 4 ++-- .../command/v1/AlterTableRenamePartitionSuite.scala | 4 ++-- .../spark/sql/execution/command/v1/DropTableSuite.scala | 4 ++-- .../sql/execution/command/v1/ShowPartitionsSuite.scala | 4 ++-- .../spark/sql/execution/command/v1/ShowTablesSuite.scala | 4 ++-- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala index 35856c4809f5..aa0668ccaaf5 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableAddPartitionSuiteBase.scala @@ -28,13 +28,13 @@ import org.apache.spark.sql.internal.SQLConf * located in more specific test suites: * * - V2 table catalog tests: - * [[org.apache.spark.sql.execution.command.v2.AlterTableAddPartitionSuite]] + * `org.apache.spark.sql.execution.command.v2.AlterTableAddPartitionSuite` * - V1 table catalog tests: - * [[org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuiteBase]] + * `org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuiteBase` * - V1 In-Memory catalog: - * [[org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuite]] + * `org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuite` * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite` */ trait AlterTableAddPartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. ADD PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala index 4260dc4d3d6f..cf8a1e9de5e0 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableDropPartitionSuiteBase.scala @@ -27,13 +27,13 @@ import org.apache.spark.sql.internal.SQLConf * located in more specific test suites: * * - V2 table catalog tests: - * [[org.apache.spark.sql.execution.command.v2.AlterTableDropPartitionSuite]] + * `org.apache.spark.sql.execution.command.v2.AlterTableDropPartitionSuite` * - V1 table catalog tests: - * [[org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuiteBase]] + * `org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuiteBase` * - V1 In-Memory catalog: - * [[org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuite]] + * `org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuite` * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite` */ trait AlterTableDropPartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. DROP PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala index ce8fc6f46518..40c167ce424a 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/AlterTableRenamePartitionSuiteBase.scala @@ -25,13 +25,13 @@ import org.apache.spark.sql.QueryTest * located in more specific test suites: * * - V2 table catalog tests: - * [[org.apache.spark.sql.execution.command.v2.AlterTableRenamePartitionSuite]] + * `org.apache.spark.sql.execution.command.v2.AlterTableRenamePartitionSuite` * - V1 table catalog tests: - * [[org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuiteBase]] + * `org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuiteBase` * - V1 In-Memory catalog: - * [[org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuite]] + * `org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuite` * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite` */ trait AlterTableRenamePartitionSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "ALTER TABLE .. RENAME PARTITION" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala index 1d9321ba6192..bb76bfd878f4 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DropTableSuiteBase.scala @@ -24,10 +24,10 @@ import org.apache.spark.sql.{AnalysisException, QueryTest, Row} * table catalogs. The tests that cannot run for all supported catalogs are located in more * specific test suites: * - * - V2 table catalog tests: [[org.apache.spark.sql.execution.command.v2.DropTableSuite]] - * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.DropTableSuiteBase]] - * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.DropTableSuite]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.DropTableSuite]] + * - V2 table catalog tests: `org.apache.spark.sql.execution.command.v2.DropTableSuite` + * - V1 table catalog tests: `org.apache.spark.sql.execution.command.v1.DropTableSuiteBase` + * - V1 In-Memory catalog: `org.apache.spark.sql.execution.command.v1.DropTableSuite` + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.DropTableSuite` */ trait DropTableSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "DROP TABLE" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala index e60261315a05..9a942d348a18 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowPartitionsSuiteBase.scala @@ -26,11 +26,11 @@ import org.apache.spark.sql.types.{StringType, StructType} * table catalogs. The tests that cannot run for all supported catalogs are located in more * specific test suites: * - * - V2 table catalog tests: [[org.apache.spark.sql.execution.command.v2.ShowPartitionsSuite]] - * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuiteBase]] - * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuite]] + * - V2 table catalog tests: `org.apache.spark.sql.execution.command.v2.ShowPartitionsSuite` + * - V1 table catalog tests: `org.apache.spark.sql.execution.command.v1.ShowPartitionsSuiteBase` + * - V1 In-Memory catalog: `org.apache.spark.sql.execution.command.v1.ShowPartitionsSuite` * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite]] + * `org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite` */ trait ShowPartitionsSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "SHOW PARTITIONS" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala index a988ac6d4576..6a1337ef5ac8 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/ShowTablesSuiteBase.scala @@ -28,10 +28,10 @@ import org.apache.spark.sql.types.StructType * table catalogs. The tests that cannot run for all supported catalogs are located in more * specific test suites: * - * - V2 table catalog tests: [[org.apache.spark.sql.execution.command.v2.ShowTablesSuite]] - * - V1 table catalog tests: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuiteBase]] - * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuite]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowTablesSuite]] + * - V2 table catalog tests: `org.apache.spark.sql.execution.command.v2.ShowTablesSuite` + * - V1 table catalog tests: `org.apache.spark.sql.execution.command.v1.ShowTablesSuiteBase` + * - V1 In-Memory catalog: `org.apache.spark.sql.execution.command.v1.ShowTablesSuite` + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.ShowTablesSuite` */ trait ShowTablesSuiteBase extends QueryTest with DDLCommandTestUtils { override val command = "SHOW TABLES" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala index 7e6393d9ab68..808eab834052 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableAddPartitionSuite.scala @@ -27,9 +27,9 @@ import org.apache.spark.sql.execution.command * specific test suites: * * - V1 In-Memory catalog: - * [[org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuite]] + * `org.apache.spark.sql.execution.command.v1.AlterTableAddPartitionSuite` * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableAddPartitionSuite` */ trait AlterTableAddPartitionSuiteBase extends command.AlterTableAddPartitionSuiteBase { override protected def checkLocation( diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala index 1da63e788d4b..a6490ebdb950 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableDropPartitionSuite.scala @@ -26,9 +26,9 @@ import org.apache.spark.sql.execution.command * specific test suites: * * - V1 In-Memory catalog: - * [[org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuite]] + * `org.apache.spark.sql.execution.command.v1.AlterTableDropPartitionSuite` * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableDropPartitionSuite` */ trait AlterTableDropPartitionSuiteBase extends command.AlterTableDropPartitionSuiteBase { override protected val notFullPartitionSpecErr = "The following partitions not found in table" diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala index faddd3e3e6b0..d923886fbdb9 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/AlterTableRenamePartitionSuite.scala @@ -28,9 +28,9 @@ import org.apache.spark.sql.internal.SQLConf * specific test suites: * * - V1 In-Memory catalog: - * [[org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuite]] + * `org.apache.spark.sql.execution.command.v1.AlterTableRenamePartitionSuite` * - V1 Hive External catalog: - * [[org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite]] + * `org.apache.spark.sql.hive.execution.command.AlterTableRenamePartitionSuite` */ trait AlterTableRenamePartitionSuiteBase extends command.AlterTableRenamePartitionSuiteBase { protected def createSinglePartTable(t: String): Unit = { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala index 463eb16c2a1b..497624f0a18d 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/DropTableSuite.scala @@ -24,8 +24,8 @@ import org.apache.spark.sql.execution.command * table catalogs. The tests that cannot run for all V1 catalogs are located in more * specific test suites: * - * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.DropTableSuite]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.DropTableSuite]] + * - V1 In-Memory catalog: `org.apache.spark.sql.execution.command.v1.DropTableSuite` + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.DropTableSuite` */ trait DropTableSuiteBase extends command.DropTableSuiteBase { test("purge option") { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala index 67b27052925a..5be5e28d0170 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowPartitionsSuite.scala @@ -25,8 +25,8 @@ import org.apache.spark.sql.execution.command * table catalogs. The tests that cannot run for all V1 catalogs are located in more * specific test suites: * - * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowPartitionsSuite]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite]] + * - V1 In-Memory catalog: `org.apache.spark.sql.execution.command.v1.ShowPartitionsSuite` + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.ShowPartitionsSuite` */ trait ShowPartitionsSuiteBase extends command.ShowPartitionsSuiteBase { test("show everything in the default database") { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala index 657af41d4f45..2cf50b7ddf25 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/ShowTablesSuite.scala @@ -27,8 +27,8 @@ import org.apache.spark.sql.types.{BooleanType, StringType, StructType} * table catalogs. The tests that cannot run for all V1 catalogs are located in more * specific test suites: * - * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.ShowTablesSuite]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.ShowTablesSuite]] + * - V1 In-Memory catalog: `org.apache.spark.sql.execution.command.v1.ShowTablesSuite` + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.ShowTablesSuite` */ trait ShowTablesSuiteBase extends command.ShowTablesSuiteBase { override def defaultNamespace: Seq[String] = Seq("default") From a819ed67eff23154a4d5aa209921a7102ac69a05 Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Sun, 27 Dec 2020 12:45:54 +0300 Subject: [PATCH 12/13] Replace [[ and ]] by `: follow up --- .../spark/sql/execution/command/DDLCommandTestUtils.scala | 6 +++--- .../spark/sql/execution/command/v1/CommandSuiteBase.scala | 2 +- .../spark/sql/execution/command/v2/CommandSuiteBase.scala | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala index 3be6a708f165..a613978ce375 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandTestUtils.scala @@ -28,9 +28,9 @@ import org.apache.spark.sql.test.SQLTestUtils * The common settings and utility functions for all v1 and v2 test suites. When a function * is not applicable to all supported catalogs, it should be placed to a specific trait: * - * - V1 In-Memory catalog: [[org.apache.spark.sql.execution.command.v1.CommandSuiteBase]] - * - V1 Hive External catalog: [[org.apache.spark.sql.hive.execution.command.CommandSuiteBase]] - * - V2 In-Memory catalog: [[org.apache.spark.sql.execution.command.v2.CommandSuiteBase]] + * - V1 In-Memory catalog: `org.apache.spark.sql.execution.command.v1.CommandSuiteBase` + * - V1 Hive External catalog: `org.apache.spark.sql.hive.execution.command.CommandSuiteBase` + * - V2 In-Memory catalog: `org.apache.spark.sql.execution.command.v2.CommandSuiteBase` */ trait DDLCommandTestUtils extends SQLTestUtils { // The version of the catalog under testing such as "V1", "V2", "Hive V1". diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/CommandSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/CommandSuiteBase.scala index 81bf2145c16e..c4ecf1c98bb6 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/CommandSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v1/CommandSuiteBase.scala @@ -23,7 +23,7 @@ import org.apache.spark.sql.test.SharedSparkSession /** * The trait contains settings and utility functions. It can be mixed to the test suites for * datasource v1 In-Memory catalog. This trait complements the common trait - * [[org.apache.spark.sql.execution.command.DDLCommandTestUtils]] with utility functions and + * `org.apache.spark.sql.execution.command.DDLCommandTestUtils` with utility functions and * settings for all unified datasource V1 and V2 test suites. */ trait CommandSuiteBase extends SharedSparkSession { diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/CommandSuiteBase.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/CommandSuiteBase.scala index ce1adcd5d083..0978126f27fd 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/CommandSuiteBase.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/command/v2/CommandSuiteBase.scala @@ -24,7 +24,7 @@ import org.apache.spark.sql.test.SharedSparkSession /** * The trait contains settings and utility functions. It can be mixed to the test suites for * datasource v2 catalogs (in-memory test catalogs). This trait complements the trait - * [[org.apache.spark.sql.execution.command.DDLCommandTestUtils]] with common utility functions + * `org.apache.spark.sql.execution.command.DDLCommandTestUtils` with common utility functions * for all unified datasource V1 and V2 test suites. */ trait CommandSuiteBase extends SharedSparkSession { From 22dc7722df3d0d63e89463bd6e8cb0195ef67988 Mon Sep 17 00:00:00 2001 From: Max Gekk Date: Sun, 27 Dec 2020 12:47:10 +0300 Subject: [PATCH 13/13] Replace [[ and ]] by `: follow up 2 --- .../spark/sql/hive/execution/command/CommandSuiteBase.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/CommandSuiteBase.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/CommandSuiteBase.scala index dea6b8e51d7b..39b4be61449c 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/CommandSuiteBase.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/command/CommandSuiteBase.scala @@ -23,7 +23,7 @@ import org.apache.spark.sql.hive.test.TestHiveSingleton /** * The trait contains settings and utility functions. It can be mixed to the test suites for * datasource v1 Hive external catalog. This trait complements the common trait - * [[org.apache.spark.sql.execution.command.DDLCommandTestUtils]] with utility functions and + * `org.apache.spark.sql.execution.command.DDLCommandTestUtils` with utility functions and * settings for all unified datasource V1 and V2 test suites. */ trait CommandSuiteBase extends TestHiveSingleton {