rdblue commented on a change in pull request #27838: 
[SPARK-30902][SQL][FOLLOW-UP] Allow ReplaceTableAsStatement to have none 
provider
URL: https://github.com/apache/spark/pull/27838#discussion_r389968253
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
 ##########
 @@ -305,7 +305,8 @@ class ResolveSessionCatalog(
     // session catalog and the table provider is not v2.
     case c @ ReplaceTableStatement(
          SessionCatalogAndTable(catalog, tbl), _, _, _, _, _, _, _, _, _) =>
-      if (!isV2Provider(c.provider)) {
+      val provider = c.provider.getOrElse(conf.defaultDataSourceName)
 
 Review comment:
   The provider doesn't determine whether the command should be run using v1 or 
v2, the table and catalog do. The provider for the session catalog matters, but 
not for any other catalog so I don't think changing either the `TableCatalog` 
or `CatalogPlugin` API is a good idea.
   
   Since this is limited to the v2 session catalog, let's come up with a way to 
delegate to the v2 session catalog for this. That, or set a default.

----------------------------------------------------------------
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]

Reply via email to