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

Benedict commented on CASSANDRA-14708:
--------------------------------------

Thanks.  It looks like we've at least introduced a bug wrt adding hours and 
seconds to a date/timestamp across leap second boundaries (and if we introduce 
TZ support, across DST boundaries), but that's an issue for another ticket.  
You brought up the issue of leap seconds in that discussion, I can see, so it's 
a shame this wasn't accounted for in the eventual solution.

On the topic of this ticket, I agree that making the type accept nanos 
exclusively is not the solution; that is a different type of duration.  It 
might have been nice to use the JDK or Joda time nomenclature for some 
consistency, and call it a period (and reserve duration for those operating 
exclusively on nanos/millis, much as in Go), but c'est la vie.

> protocol v5 duration wire format is overly complex and awkward to implement 
> for clients
> ---------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14708
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14708
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Chris Bannister
>            Priority: Major
>
> Protocol V5 defines the duration type to be on the wire as months, days and 
> nanoseconds. Days and months require a timezone to make sense of the duration 
> and varies depending on from which they are applied for.
>  
> Go defines a [duration|https://golang.org/pkg/time/#Duration] type as 
> nanoseconds in int64 which can represent ~290 years. Java 
> [duration|https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html] 
> does not have way to handle months.
>  
> I suggest that before 4.0 is release the duration format is converted to just 
> be represented as nanoseconds.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to