Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/19861#discussion_r154503590
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/DataFrameReader.scala ---
@@ -184,9 +188,16 @@ class DataFrameReader private[sql](sparkSession:
SparkSession) extends Logging {
val cls = DataSource.lookupDataSource(source)
if (classOf[DataSourceV2].isAssignableFrom(cls)) {
- val options = new DataSourceV2Options(extraOptions.asJava)
+ val dataSource = cls.newInstance()
+ val options = dataSource match {
+ case cs: ConfigSupport =>
+ val confs = withSessionConfig(cs, sparkSession.sessionState.conf)
+ new DataSourceV2Options((confs ++ extraOptions).asJava)
--- End diff --
What happened if they have duplicate names?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]