zeruibao commented on code in PR #41052:
URL: https://github.com/apache/spark/pull/41052#discussion_r1186381388
##########
connector/avro/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala:
##########
@@ -128,6 +143,26 @@ private[sql] class AvroDeserializer(
case (INT, IntegerType) => (updater, ordinal, value) =>
Review Comment:
If we use `acceptsType`, it will cause error like
`Cannot convert Avro type
{"type":"record","name":"topLevelRecord","fields":[{"name":"date","type":[{"type":"int","logicalType":"date"},"null"]}]}
to SQL type STRUCT<date: DATE>.`
The logical type is the same, but `DataTypeUtils.sameType` will return
false, that is not expected. We still allow to read if the logical type is the
same.
--
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]