imback82 commented on a change in pull request #27642: [SPARK-30885][SQL] V1 
table name should be fully qualified if catalog name is provided
URL: https://github.com/apache/spark/pull/27642#discussion_r382962850
 
 

 ##########
 File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/CachedTableSuite.scala
 ##########
 @@ -102,18 +102,18 @@ class CachedTableSuite extends QueryTest with 
SQLTestUtils with TestHiveSingleto
   }
 
   test("uncache of nonexistent tables") {
-    val expectedErrorMsg = "Table or view not found: nonexistentTable"
+    val expectedErrorMsg = "Table or view not found:"
     // make sure table doesn't exist
     var e = 
intercept[AnalysisException](spark.table("nonexistentTable")).getMessage
-    assert(e.contains(expectedErrorMsg))
+    assert(e.contains(s"$expectedErrorMsg nonexistentTable"))
 
 Review comment:
   `spark.table` just creates `UnresolvedRelation(multipartIdentifier)`, so it 
doesn't add current namespace. 
   
   Perhaps, should we retain the original multipart names somehow and use it 
inside `CheckAnalysis`? For `SELECT * FROM tbl`, what is a more desirable error 
message, `Table or view not found: tbl` or `Table or view not found: 
default.tbl`?
   
   Note that this PR always adds the current namespace to the identifier and 
postgres seems to use the original identifier given.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to