xkrogen commented on a change in pull request #31490:
URL: https://github.com/apache/spark/pull/31490#discussion_r656376622
##########
File path:
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroOptions.scala
##########
@@ -67,6 +67,13 @@ private[sql] class AvroOptions(
})
}
+ /**
+ * Iff true, perform Catalyst-to-Avro schema matching based on field
position instead of field
+ * name. This allows for a structurally equivalent Catalyst schema to be
used with an Avro schema
+ * whose field names do not match. Defaults to false.
+ */
+ val schemaRenaming: Boolean =
parameters.get("schemaRenaming").exists(_.toBoolean)
Review comment:
This is used on the read side as well, so I don't think
"writeByPosition" is correct. How about "positionalFieldMatching" or
"matchFieldsByPosition"?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]