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

Benedict commented on CASSANDRA-7523:
-------------------------------------

bq. I'd prefer to keep the complexity of dealing with / preparing for a 
constraint of byte-order comparability 

Well, it's already a beneficial characteristic, as it results in faster 
comparator operation in 2.1, so it's not about preparation for a future 
constraint. It also doesn't in any way change how you serialize, it only 
requires that you change your base value calculation, which is completely 
arbitrary (you've picked zero; if you pick MIN_VALUE and use 
ByteBufferUtil.compare() instead of LongType.compare(), everything suddenly 
works). You can still delegate serialization to the primitive types, so this 
isn't really any added complexity, it's just making things better off the bat 
for zero extra cost. As icing on top it avoids needing to do any future 
conversion to deliver byte order comparisons (which is an unnecessary cost).

TL;DR: we shouldn't be perpetuating prior mistakes in new code when we can 
avoid them for free.

> add date and time types
> -----------------------
>
>                 Key: CASSANDRA-7523
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7523
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API
>            Reporter: Jonathan Ellis
>            Assignee: Joshua McKenzie
>            Priority: Minor
>             Fix For: 2.1.1, 3.0
>
>
> http://www.postgresql.org/docs/9.1/static/datatype-datetime.html
> (we already have timestamp; interval is out of scope for now, and see 
> CASSANDRA-6350 for discussion on timestamp-with-time-zone.  but date/time 
> should be pretty easy to add.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to