XuQianJin-Stars commented on a change in pull request #4471:
URL: https://github.com/apache/hudi/pull/4471#discussion_r776548636
##########
File path:
hudi-client/hudi-spark-client/src/main/scala/org/apache/hudi/AvroConversionHelper.scala
##########
@@ -301,9 +302,17 @@ object AvroConversionHelper {
}.orNull
}
case TimestampType => (item: Any) =>
- // Convert time to microseconds since spark-avro by default converts
TimestampType to
- // Avro Logical TimestampMicros
- Option(item).map(_.asInstanceOf[Timestamp].getTime * 1000).orNull
+ if (item == null) {
Review comment:
Can add a unit test?
--
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]