wayneguow commented on code in PR #47539: URL: https://github.com/apache/spark/pull/47539#discussion_r1702549729
########## sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala: ########## @@ -691,7 +691,7 @@ object DataSource extends Logging { val internalSources = sources.filter(_.getClass.getName.startsWith("org.apache.spark")) if (provider.equalsIgnoreCase("xml") && sources.size == 2) { val externalSource = sources.filterNot(_.getClass.getName - .startsWith("org.apache.spark.sql.execution.datasources.xml.XmlFileFormat") + .startsWith("org.apache.spark.sql.execution.datasources.v2.xml.XmlDataSourceV2") Review Comment: Yes, `ServiceLoader` uses `META-INF.services/org.apache.spark.sql.sources.DataSourceRegister` file to load data source. Whether it's v1 or v2 it's the same here. I can get your doubts. When the `USE_V1_SOURCE_LIST ` includes `XML`, we finally back to using the default FileFormat here. https://github.com/apache/spark/blob/9e35d04cb030ce2ac736914a5586d159339b4686/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala#L111 -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org