cloud-fan commented on a change in pull request #24738: [SPARK-23098][SQL] 
Migrate Kafka Batch source to v2.
URL: https://github.com/apache/spark/pull/24738#discussion_r298470645
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala
 ##########
 @@ -212,8 +213,14 @@ class DataFrameReader private[sql](sparkSession: 
SparkSession) extends Logging {
         f.fallbackFileFormat
       case _ => lookupCls
     }
+    val clsMustUseV1Source = cls.newInstance() match {
+      case f: DataSourceRegister if useV1Sources.contains(f.shortName()) ||
 
 Review comment:
   cc @gengliangwang  the `useV1SourceReaderList` should be applied to all data 
sources not only file sources, according to the doc. Can you fix it? The 
current patch works but it's not a clean solution.

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