cloud-fan commented on code in PR #37347:
URL: https://github.com/apache/spark/pull/37347#discussion_r934109362
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala:
##########
@@ -278,8 +278,18 @@ abstract class ExternalCatalogSuite extends SparkFunSuite {
}
test("get tables by name") {
- assert(newBasicCatalog().getTablesByName("db2", Seq("tbl1", "tbl2"))
- .map(_.identifier.table) == Seq("tbl1", "tbl2"))
+ val catalog = newBasicCatalog()
+ val tables = catalog.getTablesByName("db2", Seq("tbl1", "tbl2"))
+ assert(tables.map(_.identifier.table) == Seq("tbl1", "tbl2"))
+ assert(tables.forall(_.identifier.catalog.isDefined))
+
+ // After renaming a table, the identifier should still be qualified with
catalog.
+ catalog.renameTable("db2", "tbl1", "tblone")
+ // TODO: HMS seems to have a bug and the order of returned tables do not
match the order of
+ // table names. You can reproduce the bug by passing `Seq("tblone",
"tbl2")` here.
Review Comment:
cc @somani @yaooqinn @wangyum
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]