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

Ed Anuff commented on CASSANDRA-2233:
-------------------------------------

That test is comparing a time-based and non-timed based UUID, I believe.  My 
version of this was using:

assertEquals(c, sign(compareUsingJUG(u1, u2)));

Looks like you changed it to:

+        if (u1.version() == 1)
+            assertEquals(c, TimeUUIDType.instance.compare(bytebuffer(u1), 
bytebuffer(u2)));

It needs to be this if you're testing compatibility with TimeUUIDType:

+        if ((u1.version() == 1) && (u2.version() == 1))
+            assertEquals(c, TimeUUIDType.instance.compare(bytebuffer(u1), 
bytebuffer(u2)));


> Add unified UUIDType
> --------------------
>
>                 Key: CASSANDRA-2233
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2233
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 0.7.3
>            Reporter: Ed Anuff
>            Priority: Minor
>         Attachments: 2233.txt, UUIDType.java, UUIDTypeTest.java
>
>
> Unified UUIDType comparator, compares as time-based if both UUIDs are 
> time-based, otherwise uses byte comparison.  Based on code from the current 
> LexicalUUIDType and TimeUUIDType comparers, so performance and behavior 
> should be consistent and compatible.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to