gengliangwang commented on a change in pull request #33308:
URL: https://github.com/apache/spark/pull/33308#discussion_r674723801
##########
File path:
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroUtils.scala
##########
@@ -228,6 +242,40 @@ private[sql] object AvroUtils extends Logging {
.groupBy(_.name.toLowerCase(Locale.ROOT))
.mapValues(_.toSeq) // toSeq needed for scala 2.13
+ /** Get the fields which have matching equivalents in both Avro and
Catalyst schemas. */
+ def getMatchedFields: Seq[AvroMatchedField] =
catalystSchema.zipWithIndex.flatMap {
Review comment:
let's store this in a `val`. My previous comment for "not storing" is
for adding new code for validation only.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]