You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/03 05:43:26 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #26741:
[SPARK-30104][SQL] Fix catalog resolution for 'global_temp'
cloud-fan commented on a change in pull request #26741: [SPARK-30104][SQL] Fix catalog resolution for 'global_temp'
URL: https://github.com/apache/spark/pull/26741#discussion_r352993187
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -1813,6 +1813,17 @@ class DataSourceV2SQLSuite
}
}
+ test("global temp db is used as a table name under v2 catalog") {
+ val globalTempDB = spark.sessionState.conf.getConf(StaticSQLConf.GLOBAL_TEMP_DATABASE)
+ val t = s"testcat.$globalTempDB"
+ withTable(t) {
+ sql(s"CREATE TABLE $t (id bigint, data string) USING foo")
+ sql("USE testcat")
+ // The following should not throw AnalysisException, but should use `testcat.$globalTempDB`.
+ sql(s"DESCRIBE TABLE $globalTempDB")
Review comment:
what happens if we have a table `testcat` under catalog `testcat`, and then run `DESCRIBE TABLE testcat`?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org