cloud-fan commented on a change in pull request #25465: [SPARK-28747][SQL] merge the two data source v2 fallback configs URL: https://github.com/apache/spark/pull/25465#discussion_r315659354
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceResolution.scala ########## @@ -182,21 +180,13 @@ case class DataSourceResolution( } - object V1WriteProvider { - private val v1WriteOverrideSet = - conf.useV1SourceWriterList.toLowerCase(Locale.ROOT).split(",").toSet - + object V1Provider { def unapply(provider: String): Option[String] = { - if (v1WriteOverrideSet.contains(provider.toLowerCase(Locale.ROOT))) { Review comment: We have a bug here. The provider can be a short name or a qualified class name, and `useV1SourceWriterList` should support both. For example, if `orc` is in `useV1SourceWriterList`, then we should fallback to DS V1 if the provider is `orc` or `org.apache.spark.sql.execution.datasources.v2.orc.OrcDataSourceV2`. This is also how we handle the v1 fallback list in `DataFrameReader/Writer`. See https://github.com/apache/spark/pull/25465/files#diff-f70bda59304588cc3abfa3a9840653f4L211 ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org