brkyvz commented on a change in pull request #26868: [SPARK-29665][SQL] refine
the TableProvider interface
URL: https://github.com/apache/spark/pull/26868#discussion_r367729542
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Utils.scala
##########
@@ -57,4 +59,28 @@ private[sql] object DataSourceV2Utils extends Logging {
case _ => Map.empty
}
}
+
+ def getTableFromProvider(
+ provider: TableProvider,
+ options: CaseInsensitiveStringMap,
+ userSpecifiedSchema: Option[StructType]): Table = {
+ userSpecifiedSchema match {
+ case Some(schema) =>
+ if (provider.supportsExternalMetadata()) {
Review comment:
can we name this `supportsUserSpecifiedSchema` if this is only going to
throw an error for this case?
----------------------------------------------------------------
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]