HyukjinKwon commented on code in PR #42037:
URL: https://github.com/apache/spark/pull/42037#discussion_r1268879200
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala:
##########
@@ -152,15 +153,25 @@ class OrcFileFormat
assert(supportBatch(sparkSession, resultSchema))
}
- OrcConf.IS_SCHEMA_EVOLUTION_CASE_SENSITIVE.setBoolean(hadoopConf,
sqlConf.caseSensitiveAnalysis)
-
- val broadcastedConf =
- sparkSession.sparkContext.broadcast(new
SerializableConfiguration(hadoopConf))
val isCaseSensitive = sparkSession.sessionState.conf.caseSensitiveAnalysis
+ OrcConf.IS_SCHEMA_EVOLUTION_CASE_SENSITIVE.setBoolean(hadoopConf,
isCaseSensitive)
+ val broadcastedHadoopConf = if (options.isEmpty) {
+ Option.empty
+ } else {
+ Option(sparkSession.sparkContext.broadcast(new
SerializableConfiguration(hadoopConf)))
+ }
+
val orcFilterPushDown = sparkSession.sessionState.conf.orcFilterPushDown
+ val sparkConf = sparkSession.sparkContext.conf
(file: PartitionedFile) => {
- val conf = broadcastedConf.value.value
+ val conf = if (broadcastedHadoopConf.isDefined) {
+ broadcastedHadoopConf.get.value.value
Review Comment:
Oh, I see. you're passing the original one here. Okay I am good with this
approach.
--
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]