MaxGekk commented on a change in pull request #26399: [SPARK-29757][SQL] Move 
calendar interval constants together
URL: https://github.com/apache/spark/pull/26399#discussion_r342738760
 
 

 ##########
 File path: 
external/avro/src/main/scala/org/apache/spark/sql/avro/AvroDeserializer.scala
 ##########
 @@ -110,7 +110,7 @@ class AvroDeserializer(rootAvroType: Schema, 
rootCatalystType: DataType) {
       // Before we upgrade Avro to 1.8 for logical type support, spark-avro 
converts Long to Date.
       // For backward compatibility, we still keep this conversion.
       case (LONG, DateType) => (updater, ordinal, value) =>
-        updater.setInt(ordinal, (value.asInstanceOf[Long] / 
DateTimeUtils.MILLIS_PER_DAY).toInt)
+        updater.setInt(ordinal, (value.asInstanceOf[Long] / 
IntervalConstants.MILLIS_PER_DAY).toInt)
 
 Review comment:
   Here and below, if only one constant is used, import only this constant.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to