imback82 commented on a change in pull request #26214: [SPARK-29558][SQL] 
ResolveTables and ResolveRelations should be order-insensitive
URL: https://github.com/apache/spark/pull/26214#discussion_r338241306
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalogSuite.scala
 ##########
 @@ -599,42 +599,6 @@ abstract class SessionCatalogSuite extends AnalysisTest {
     }
   }
 
-  test("lookup table relation") {
-    withBasicCatalog { catalog =>
-      val tempTable1 = Range(1, 10, 1, 10)
-      val metastoreTable1 = catalog.externalCatalog.getTable("db2", "tbl1")
-      catalog.createTempView("tbl1", tempTable1, overrideIfExists = false)
-      catalog.setCurrentDatabase("db2")
-      // If we explicitly specify the database, we'll look up the relation in 
that database
-      assert(catalog.lookupRelation(TableIdentifier("tbl1", 
Some("db2"))).children.head
-        .asInstanceOf[UnresolvedCatalogRelation].tableMeta == metastoreTable1)
-      // Otherwise, we'll first look up a temporary table with the same name
-      assert(catalog.lookupRelation(TableIdentifier("tbl1"))
-        == SubqueryAlias("tbl1", tempTable1))
-      // Then, if that does not exist, look up the relation in the current 
database
-      catalog.dropTable(TableIdentifier("tbl1"), ignoreIfNotExists = false, 
purge = false)
-      assert(catalog.lookupRelation(TableIdentifier("tbl1")).children.head
 
 Review comment:
   do we need to have tests for `lookup*` and `createV1Relation`?

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