MaxGekk commented on a change in pull request #27200: [SPARK-30509][SQL] Fix
deprecation log warning in Avro schema inferring
URL: https://github.com/apache/spark/pull/27200#discussion_r366274568
##########
File path:
external/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala
##########
@@ -1497,6 +1497,32 @@ abstract class AvroSuite extends QueryTest with
SharedSparkSession {
|}
""".stripMargin)
}
+
+ test("log a warning of ignoreExtension deprecation") {
+ val logAppender = new LogAppender
+ withTempPath { dir =>
+ Seq(("a", 1, 2), ("b", 1, 2), ("c", 2, 1), ("d", 2, 1))
+ .toDF("value", "p1", "p2")
+ .repartition(2)
+ .write
+ .format("avro")
+ .option("header", true)
+ .save(dir.getCanonicalPath)
+ withLogAppender(logAppender) {
+ spark
+ .read
+ .format("avro")
+ .option(AvroOptions.ignoreExtensionKey, false)
+ .option("header", true)
Review comment:
Yeh, it is not needed. It seems the test which I copy-pasted was copy-pasted
from another places. I guess from
https://github.com/apache/spark/blob/b389b8c5f0650a7e63098f18437fcaa29998732a/sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala#L746-L787
Let me remove the option from other avro test as well.
----------------------------------------------------------------
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]