7mming7 commented on code in PR #42037:
URL: https://github.com/apache/spark/pull/42037#discussion_r1266742365


##########
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:
   I want to ask if this PR reform is reasonable



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