voonhous commented on issue #20916: URL: https://github.com/apache/hudi/issues/20916#issuecomment-7155360378
The constructor change comes from [SPARK-59108](https://issues.apache.org/jira/browse/SPARK-59108), "Fix Avro positional matching under column pruning", backported to all three lines. It is the latest commit touching `sql/core/src/main/scala/org/apache/spark/sql/avro/AvroUtils.scala` on each release tag: | tag | commit | |---|---| | v4.0.5 | apache/spark@51edde5ee4 | | v4.1.4 | apache/spark@0d04ec8ff6 | | v4.2.1 | apache/spark@84c89bfb89 | ```diff class AvroSchemaHelper( avroSchema: Schema, catalystSchema: StructType, avroPath: Seq[String], catalystPath: Seq[String], - positionalFieldMatch: Boolean) { + positionalFieldMatch: Boolean, + dataSchemaPositions: Array[Int] = Array.empty) { ``` The default value is why Hudi's five-argument call still compiles while its bytecode targets the six-parameter constructor. This is not an Avro library change. Spark's `avro.version` is the same on both sides of each bump: 1.12.0 for 4.0.2 and 4.0.5, 1.12.1 for 4.1.1, 4.1.4, 4.2.0 and 4.2.1. SPARK-59108 itself fixes wrong results in Spark's Avro reader when `positionalFieldMatching` is on and the read is column-pruned. Hudi carries its own copy of `AvroDeserializer`, so it may be worth checking whether that copy has the same problem; not checked here. -- 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]
