You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/05/03 21:20:00 UTC

[jira] [Commented] (AVRO-3475) Enforce time-millis and time-micros specification

    [ https://issues.apache.org/jira/browse/AVRO-3475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17531422#comment-17531422 ] 

ASF subversion and git services commented on AVRO-3475:
-------------------------------------------------------

Commit 85a87258342d0de75e21e736a5a0ac4c39c025a3 in avro's branch refs/heads/branch-1.11 from Zoltan Csizmadia
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=85a872583 ]

AVRO-3475: Enforce  time-millis and time-micros specification (#1626)

* Enforce  time-millis and time-micros specification

* Remove unused var

* Use TimeSpan formatting in exception message

* Use TimeSpan formatting in exception message

* Move TicksPerMicrosecond to LogicalUnixEpochType

* Remove debug line

Co-authored-by: Zoltan Csizmadia <Cs...@valassis.com>
(cherry picked from commit 193d528d391a27079ae5ea4b0a01f4819405f6ff)


> Enforce time-millis and time-micros specification
> -------------------------------------------------
>
>                 Key: AVRO-3475
>                 URL: https://issues.apache.org/jira/browse/AVRO-3475
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: csharp
>            Reporter: Zoltan Csizmadia
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.12.0
>
>   Original Estimate: 24h
>          Time Spent: 50m
>  Remaining Estimate: 23h 10m
>
> During fixing AVRO-3471, I noticed that negative in/long values or negative TimeSpan values are allowed for time-millis and time-micros. [https://avro.apache.org/docs/current/spec.html] states that, it is supposed to be the number of us/ms after midnight 00:00:00. The following TimSpan values do not cause any overflow exceptions:
>  
> "-00:00:00.001"
> "-999999.00:00:00"
>  
>  # This change should throw exceptions in cases where the code has not thrown exceptions before
>  # OutOfRange exception message should be changed to `'time-millis/micros' value must be at least '00:00:00' and less than '1.00:00:00'.` to reflect the spec precisely
>  
> It might make sense to introduce this change only in 1.12.0, because of all the above changes



--
This message was sent by Atlassian Jira
(v8.20.7#820007)