gengliangwang commented on code in PR #41052:
URL: https://github.com/apache/spark/pull/41052#discussion_r1204946209
##########
connector/avro/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala:
##########
@@ -128,6 +151,26 @@ private[sql] class AvroDeserializer(
case (INT, IntegerType) => (updater, ordinal, value) =>
updater.setInt(ordinal, value.asInstanceOf[Int])
+ case (INT, DateType) if isNotExactType =>
+ throw incorrectTypeException(DateType)
+
+ case (LONG, DateType) if isNotExactType =>
+ throw new IncompatibleSchemaException(incompatibleMsg)
+
+ case (INT, y: YearMonthIntervalType) if isNotExactType =>
Review Comment:
Also, why do we have to block this?
As per
https://github.com/apache/spark/commit/562f43c945315aaa0d0979ec1a16bfb5616dd053,
Avro should be able to read/write ansi interval types.
cc @MaxGekk
--
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]