gengliangwang commented on a change in pull request #24043: [SPARK-11412][SQL]
Support merge schema for ORC
URL: https://github.com/apache/spark/pull/24043#discussion_r292472811
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcOptions.scala
##########
@@ -57,9 +57,20 @@ class OrcOptions(
}
shortOrcCompressionCodecNames(codecName)
}
+
+ /**
+ * Whether it merges schemas or not. When the given Orc files have different
schemas,
+ * the schemas can be merged. By default use the value specified in SQLConf.
+ */
+ val mergeSchema: Boolean = parameters
+ .get(MERGE_SCHEMA)
+ .map(_.toBoolean)
+ .getOrElse(sqlConf.isOrcSchemaMergingEnabled)
}
object OrcOptions {
+ val MERGE_SCHEMA = "mergeSchema"
Review comment:
We should at least add a test case for this new option
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]