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 2019/04/15 12:01:01 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #24356: [SPARK-27448][SQL] File source V2 table provider should be compatible with V1 provider

cloud-fan commented on a change in pull request #24356: [SPARK-27448][SQL] File source V2 table provider should be compatible with V1 provider
URL: https://github.com/apache/spark/pull/24356#discussion_r275326254
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
 ##########
 @@ -235,6 +236,24 @@ case class PreprocessTableCreation(sparkSession: SparkSession) extends Rule[Logi
       }
   }
 
+  private def compatibleProviders(a: Class[_], b: Class[_]): Boolean = {
 
 Review comment:
   how about
   ```
   def fallBackToV1(cls: Class[_]) = cls.newInstance match {
     case f: FileDataSourceV2 => f.fallbackFileFormat
     case _ => cls
   }
   
   ...
   
   fallBackToV1(existingProvider) == fallBackToV1(specifiedProvider)
   ```

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