opwvhk commented on a change in pull request #1263:
URL: https://github.com/apache/avro/pull/1263#discussion_r783670909



##########
File path: lang/java/avro/src/main/java/org/apache/avro/Conversions.java
##########
@@ -146,6 +149,111 @@ private static BigDecimal validate(final 
LogicalTypes.Decimal decimal, BigDecima
     }
   }
 
+  public static class DurationConversion extends Conversion<Duration> {
+
+      private static final int MONTH_DAYS = 30;

Review comment:
       A month has 28, 29, 30 or 31 days. Hardcoding a single value (31 
days/month occurs more often) is basically a bug. Note that this cannot be 
fixed if we choose to support all possible duration values (see the 
conversation comments for more info).




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


Reply via email to