Github user MaxGekk commented on a diff in the pull request:
https://github.com/apache/spark/pull/21798#discussion_r203168190
--- Diff:
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroFileFormat.scala ---
@@ -276,10 +274,15 @@ private[avro] object AvroFileFormat {
}
}
- def ignoreFilesWithoutExtensions(conf: Configuration): Boolean = {
- // Files without .avro extensions are not ignored by default
- val defaultValue = false
+ def ignoreExtension(conf: Configuration, options: Map[String, String]):
Boolean = {
+ val ignoreFilesWithoutExtensionByDefault = false
+ val ignoreFilesWithoutExtension = conf.getBoolean(
+ AvroFileFormat.IgnoreFilesWithoutExtensionProperty,
+ ignoreFilesWithoutExtensionByDefault)
- conf.getBoolean(AvroFileFormat.IgnoreFilesWithoutExtensionProperty,
defaultValue)
+ options
+ .get("ignoreExtension")
--- End diff --
Sure, I am going to add the `AvroOption` class and document all Avro
options there.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]