gengliangwang commented on code in PR #41521:
URL: https://github.com/apache/spark/pull/41521#discussion_r1223952202


##########
connector/avro/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala:
##########
@@ -160,6 +160,14 @@ private[sql] class AvroDeserializer(
         (logicalDataType, catalystType) match {
           case (LongType, LongType) => (updater, ordinal, value) =>
             updater.setLong(ordinal, value.asInstanceOf[Long])
+          case (_, LongType) => avroType.getLogicalType match {
+            case _: TimestampMicros | _: TimestampMillis |

Review Comment:
   Could it be a long standing bug?
   I am seeing:
   
https://github.com/apache/spark/pull/41052/files#diff-2eaa6c4b7371cae9800cff1cee843a6245ab91206595cf0e403c077ab2ba80daL138
   
   ```
   // For backward compatibility, if the Avro type is Long and it is not 
logical type
           // (the `null` case), the value is processed as timestamp type with 
millisecond precision.
   ```



-- 
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]

Reply via email to