cloud-fan commented on a change in pull request #34490:
URL: https://github.com/apache/spark/pull/34490#discussion_r743486094
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala
##########
@@ -861,9 +857,9 @@ object QueryCompilationErrors {
new TableAlreadyExistsException(ident)
}
- def requiresSinglePartNamespaceError(ident: Identifier): Throwable = {
- new NoSuchTableException(
- s"V2 session catalog requires a single-part namespace: ${ident.quoted}")
+ def requiresSinglePartNamespaceError(ns: Seq[String]): Throwable = {
+ new AnalysisException(
Review comment:
We can't throw `NoSuchTableException` here. The
`CatalogV2Utils.loadTable` swallows `NoSuchTableException` and delays the error
to `CheckAnalysis`, and we lost the actual error message.
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -2476,22 +2456,6 @@ class DataSourceV2SQLSuite
.head().getString(1) === expectedComment)
}
- test("SPARK-30799: temp view name can't contain catalog name") {
- val sessionCatalogName = CatalogManager.SESSION_CATALOG_NAME
- withTempView("v") {
- spark.range(10).createTempView("v")
- val e1 = intercept[AnalysisException](
- sql(s"CACHE TABLE $sessionCatalogName.v")
Review comment:
This is already tested in
https://github.com/apache/spark/pull/34490/files#diff-eeb429a8e3eb55228451c8dbc2fccca044836be608d62e9166561b005030c940R2317
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -2476,22 +2456,6 @@ class DataSourceV2SQLSuite
.head().getString(1) === expectedComment)
}
- test("SPARK-30799: temp view name can't contain catalog name") {
- val sessionCatalogName = CatalogManager.SESSION_CATALOG_NAME
- withTempView("v") {
- spark.range(10).createTempView("v")
- val e1 = intercept[AnalysisException](
- sql(s"CACHE TABLE $sessionCatalogName.v")
- )
- assert(e1.message.contains(
- "Table or view not found: spark_catalog.v"))
- }
- val e2 = intercept[AnalysisException] {
- sql(s"CREATE TEMP VIEW $sessionCatalogName.v AS SELECT 1")
Review comment:
It's a parser error, I moved the test to
https://github.com/apache/spark/pull/34490/files#diff-0db82228a944d6070203b6ac834c3c8d9b16b985fc3ff319ed7408fc3b6a6c23R363
--
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]