imback82 commented on a change in pull request #25771: [SPARK-28970][SQL]
Implement USE CATALOG/NAMESPACE for Data Source V2
URL: https://github.com/apache/spark/pull/25771#discussion_r325977202
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -60,22 +60,10 @@ object SimpleAnalyzer extends Analyzer(
},
new SQLConf().copy(SQLConf.CASE_SENSITIVE -> true))
-object FakeV2SessionCatalog extends TableCatalog {
+object FakeV2SessionCatalog extends CatalogPlugin {
private def fail() = throw new UnsupportedOperationException
- override def listTables(namespace: Array[String]): Array[Identifier] = fail()
- override def loadTable(ident: Identifier): Table = {
- throw new NoSuchTableException(ident.toString)
- }
- override def createTable(
- ident: Identifier,
- schema: StructType,
- partitions: Array[Transform],
- properties: util.Map[String, String]): Table = fail()
- override def alterTable(ident: Identifier, changes: TableChange*): Table =
fail()
- override def dropTable(ident: Identifier): Boolean = fail()
- override def renameTable(oldIdent: Identifier, newIdent: Identifier): Unit =
fail()
override def initialize(name: String, options: CaseInsensitiveStringMap):
Unit = fail()
- override def name(): String = fail()
+ override def name(): String = "fake_v2_session"
Review comment:
This can be anything, no? I can change it, but curious why it has to be
`CatalogManager.SESSION_CATALOG_NAME`
----------------------------------------------------------------
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]