MaxGekk commented on a change in pull request #30444:
URL: https://github.com/apache/spark/pull/30444#discussion_r527620676
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -1980,57 +1978,6 @@ class DataSourceV2SQLSuite
}
}
- test("ALTER TABLE RECOVER PARTITIONS") {
- val t = "testcat.ns1.ns2.tbl"
- withTable(t) {
- spark.sql(s"CREATE TABLE $t (id bigint, data string) USING foo")
- val e = intercept[AnalysisException] {
- sql(s"ALTER TABLE $t RECOVER PARTITIONS")
- }
- assert(e.message.contains("ALTER TABLE RECOVER PARTITIONS is only
supported with v1 tables"))
- }
- }
-
- test("ALTER TABLE ADD PARTITION") {
- val t = "testpart.ns1.ns2.tbl"
- withTable(t) {
- spark.sql(s"CREATE TABLE $t (id bigint, data string) USING foo
PARTITIONED BY (id)")
- spark.sql(s"ALTER TABLE $t ADD PARTITION (id=1) LOCATION 'loc'")
-
- val partTable = catalog("testpart").asTableCatalog
- .loadTable(Identifier.of(Array("ns1", "ns2"),
"tbl")).asInstanceOf[InMemoryPartitionTable]
- assert(partTable.partitionExists(InternalRow.fromSeq(Seq(1))))
-
- val partMetadata =
partTable.loadPartitionMetadata(InternalRow.fromSeq(Seq(1)))
- assert(partMetadata.containsKey("location"))
- assert(partMetadata.get("location") == "loc")
- }
- }
-
- test("ALTER TABLE RENAME PARTITION") {
- val t = "testcat.ns1.ns2.tbl"
- withTable(t) {
- spark.sql(s"CREATE TABLE $t (id bigint, data string) USING foo
PARTITIONED BY (id)")
- val e = intercept[AnalysisException] {
- sql(s"ALTER TABLE $t PARTITION (id=1) RENAME TO PARTITION (id=2)")
- }
- assert(e.message.contains("ALTER TABLE RENAME PARTITION is only
supported with v1 tables"))
- }
- }
Review comment:
https://github.com/apache/spark/blob/1eb236b9360a000afc30424341698fe26ee96d0f/sql/core/src/test/scala/org/apache/spark/sql/connector/AlterTablePartitionV2SQLSuite.scala#L103-L112
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]