MaxGekk commented on a change in pull request #27174: [SPARK-30490][SQL]
Eliminate compiler warnings in Avro datasource
URL: https://github.com/apache/spark/pull/27174#discussion_r365572710
##########
File path:
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroOptions.scala
##########
@@ -78,7 +80,17 @@ class AvroOptions(
parameters
.get(AvroOptions.ignoreExtensionKey)
.map(_.toBoolean)
- .getOrElse(!ignoreFilesWithoutExtension)
+ .map { ignoreExtensionOption =>
+ if (ignoreExtensionOption != !ignoreFilesWithoutExtensionByDefault) {
+ warn(s"The Avro option '${AvroOptions.ignoreExtensionKey}'")
Review comment:
@HyukjinKwon I will check that but general thoughts are:
1. The log warning is printed only if an user sets non-default config values
2. I don't think `AvroOptions` should be created (initialized from scratch)
per-each file if it is created in current implementation.
----------------------------------------------------------------
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]