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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to