cloud-fan commented on a change in pull request #25651: [SPARK-28948][SQL]
Support passing all Table metadata in TableProvider
URL: https://github.com/apache/spark/pull/25651#discussion_r332613323
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/V1Table.scala
##########
@@ -51,38 +52,36 @@ private[sql] case class V1Table(v1Table: CatalogTable)
extends Table {
}
}
- def catalogTable: CatalogTable = v1Table
-
lazy val options: Map[String, String] = {
- v1Table.storage.locationUri match {
+ catalogTable.storage.locationUri match {
case Some(uri) =>
- v1Table.storage.properties + ("path" -> uri.toString)
+ catalogTable.storage.properties + ("path" -> uri.toString)
case _ =>
- v1Table.storage.properties
+ catalogTable.storage.properties
}
}
- override lazy val properties: util.Map[String, String] =
v1Table.properties.asJava
+ override lazy val properties: util.Map[String, String] =
catalogTable.properties.asJava
Review comment:
I leave the options/properties unchanged here, but we need to figure it out
later. Currently there are 2 directions:
1. We have table options and table properties. Table options are special
table properties with "option." prefix in its name. Table options will be
extracted and used as scan/write options.
2. We only have table properties. The OPTIONS clause in CREATE TABLE should
be the same as the TBLPROPERTIES clause.
We can have more discussion about it later.
----------------------------------------------------------------
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]