uros-b commented on code in PR #56825:
URL: https://github.com/apache/spark/pull/56825#discussion_r3485846893
##########
sql/core/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala:
##########
@@ -213,6 +213,28 @@ private[sql] class AvroDeserializer(
s"Avro logical type $other cannot be converted to SQL type
${TimeType().sql}.")
}
+ case (LONG, t: TimestampLTZNanosType) => avroType.getLogicalType match {
+ // The timestamp-nanos logical type stores epoch-nanoseconds (Long),
while the value is
+ // represented internally as (epochMicros, nanosWithinMicro). Floor
semantics keep
+ // nanosWithinMicro in [0, 999] for pre-epoch values. Nanos timestamps
are always proleptic
+ // Gregorian, so they are exempt from datetime rebasing.
+ case _: LogicalTypes.TimestampNanos => (updater, ordinal, value) =>
Review Comment:
Do we really need to use fully qualified names in these cases? Same for
AvroSerializer?
--
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]