viirya commented on a change in pull request #26350: [SPARK-29676][SQL] ALTER
TABLE (RENAME PARTITION) should look up catalog/table like v2 commands
URL: https://github.com/apache/spark/pull/26350#discussion_r341377048
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -1383,7 +1383,18 @@ class DataSourceV2SQLSuite
}
assert(e.message.contains("ALTER TABLE RECOVER PARTITIONS is only
supported with v1 tables"))
}
- }
+ }
+
+ 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] {
+ val partition = sql(s"ALTER TABLE $t PARTITION (id=1) RENAME TO
PARTITION (id=2)")
Review comment:
do need `val partition =`?
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]