HyukjinKwon commented on a change in pull request #28177: 
[SPARK-31407][SQL][TEST] TestHiveQueryExecution should respect database when 
creating table
URL: https://github.com/apache/spark/pull/28177#discussion_r407343384
 
 

 ##########
 File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
 ##########
 @@ -588,20 +589,31 @@ private[hive] class TestHiveQueryExecution(
 
   override lazy val analyzed: LogicalPlan = {
     val describedTables = logical match {
-      case CacheTableCommand(tbl, _, _, _) => tbl.table :: Nil
+      case CacheTableCommand(tbl, _, _, _) => tbl :: Nil
       case _ => Nil
     }
 
     // Make sure any test tables referenced are loaded.
     val referencedTables =
       describedTables ++
-        logical.collect { case UnresolvedRelation(ident) => ident.last }
+        logical.collect { case UnresolvedRelation(ident) =>
+          TableIdentifier(ident.last, ident.init.lastOption)
 
 Review comment:
   Or you can just use:
   
   ```scala
   import org.apache.spark.sql.connector.catalog.CatalogV2Implicits._
   ...
   logical.collect { case UnresolvedRelation(ident) => ident.asTableIdentifier }
   ```
   
   I guess.

----------------------------------------------------------------
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]

Reply via email to