[ 
https://issues.apache.org/jira/browse/AVRO-3471?focusedWorklogId=748256&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-748256
 ]

ASF GitHub Bot logged work on AVRO-3471:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Mar/22 19:48
            Start Date: 26/Mar/22 19:48
    Worklog Time Spent: 10m 
      Work Description: zcsizmadia commented on a change in pull request #1623:
URL: https://github.com/apache/avro/pull/1623#discussion_r835803516



##########
File path: lang/csharp/src/apache/main/Util/TimeMicrosecond.cs
##########
@@ -50,17 +51,16 @@ public override object ConvertToBaseValue(object 
logicalValue, LogicalSchema sch
         {
             var time = (TimeSpan)logicalValue;
 
-            if (time > _maxTime)
+            if (time >= _maxTime)
                 throw new ArgumentOutOfRangeException(nameof(logicalValue), "A 
'time-micros' value can only have the range '00:00:00' to '23:59:59'.");

Review comment:
       The bigger issue is that `ConvertToLogicalValue` does not check if the 
base value (long) is >=0 and less than 1 day. IMO it should throw the same 
exception. However this change could be a drastic addition, because the code 
would start to throw exceptions where it did not throw before. (even it 
should). I would ugnore that issue for now.




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


Issue Time Tracking
-------------------

            Worklog Id:     (was: 748256)
    Remaining Estimate: 22h 20m  (was: 22.5h)
            Time Spent: 1h 40m  (was: 1.5h)

> Microseconds logical types are rounded to milliseconds
> ------------------------------------------------------
>
>                 Key: AVRO-3471
>                 URL: https://issues.apache.org/jira/browse/AVRO-3471
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: csharp
>            Reporter: Zoltan Csizmadia
>            Priority: Major
>              Labels: pull-request-available
>   Original Estimate: 24h
>          Time Spent: 1h 40m
>  Remaining Estimate: 22h 20m
>
> Microseconds logical types are rounded to milliseconds
>  
> E.g.
>  # 1 us is deserialized into 00:00:00, instead of 00:00:00.000001
>  #  1234 us is deserialized into 00:00:00.001, instead of 00:00:00.001234



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to