HyukjinKwon commented on code in PR #42037:
URL: https://github.com/apache/spark/pull/42037#discussion_r1266544575


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFileFormat.scala:
##########
@@ -198,13 +215,50 @@ class ParquetFileFormat
       assert(supportBatch(sparkSession, resultSchema))
     }
 
+    val sparkConf = sparkSession.sparkContext.conf
+
     (file: PartitionedFile) => {
       assert(file.partitionValues.numFields == partitionSchema.size)
 
       val filePath = file.toPath
       val split = new FileSplit(filePath, file.start, file.length, 
Array.empty[String])
 
-      val sharedConf = broadcastedHadoopConf.value.value
+      val sharedConf = if (broadcastedHadoopConf.isDefined) {
+        broadcastedHadoopConf.get.value.value
+      } else {
+        val conf = SparkHadoopUtil.get.newConfiguration(sparkConf)
+        conf.set(ParquetInputFormat.READ_SUPPORT_CLASS, readSupportClass)
+        conf.set(
+          ParquetReadSupport.SPARK_ROW_REQUESTED_SCHEMA,

Review Comment:
   Nah, once you make it empty, it will all invalidate the settings like for 
Parquet. These are just few examples that Spark explicitly sets.



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

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to