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 2020/03/09 05:06:14 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #27838: [SPARK-30902][SQL][FOLLOW-UP] Allow ReplaceTableAsStatement to have none provider

cloud-fan 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_r389464985
 
 

 ##########
 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:
   It's better to put the default provider in `V2SessionCatalog`, but the problem here is: this rule need to know the provider and see if it's v2, and then pick v1 or v2 command.

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