Cassandra
  1. Cassandra
  2. CASSANDRA-2231

Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 0.8.1
    • Component/s: Examples
    • Labels:
      None

      Description

      CompositeType is a custom comparer that makes it possible to create comparable composite values out of the basic types that Cassandra currently supports, such as Long, UUID, etc. This is very useful in both the creation of custom inverted indexes using columns in a skinny row, where each column name is a composite value, and also when using Cassandra's built-in secondary index support, where it can be used to encode the values in the columns that Cassandra indexes. One scenario for the usage of these is documented here: http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html. Source for contribution is attached and has been previously maintained on github here: https://github.com/edanuff/CassandraCompositeType

        Issue Links

          Activity

          Ed Anuff created issue -
          Ed Anuff made changes -
          Field Original Value New Value
          Attachment edanuff-CassandraCompositeType-1e253c4.zip [ 12471767 ]
          Jonathan Ellis made changes -
          Reviewer slebresne
          Sylvain Lebresne made changes -
          Attachment 0001-Add-compositeType.patch [ 12472441 ]
          Sylvain Lebresne made changes -
          Attachment 0001-Add-compositeType-and-DynamicCompositeType.patch [ 12472554 ]
          Sylvain Lebresne made changes -
          Assignee Sylvain Lebresne [ slebresne ]
          Reviewer slebresne
          Sylvain Lebresne made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Fix Version/s 0.7.5 [ 12316288 ]
          Sylvain Lebresne made changes -
          Attachment 0001-Add-compositeType-and-DynamicCompositeType.patch [ 12472554 ]
          Sylvain Lebresne made changes -
          Attachment 0001-Add-compositeType-and-DynamicCompositeType.patch [ 12474004 ]
          Sylvain Lebresne made changes -
          Attachment 0001-Add-compositeType-and-DynamicCompositeType.patch [ 12474004 ]
          Sylvain Lebresne made changes -
          Attachment 0001-Add-compositeType.patch [ 12472441 ]
          Sylvain Lebresne made changes -
          Sylvain Lebresne made changes -
          Link This issue depends on CASSANDRA-2355 [ CASSANDRA-2355 ]
          Sylvain Lebresne made changes -
          Sylvain Lebresne made changes -
          Sylvain Lebresne made changes -
          Issue Type Improvement [ 4 ] New Feature [ 2 ]
          Fix Version/s 0.8.1 [ 12316368 ]
          Fix Version/s 0.7.5 [ 12316288 ]
          Affects Version/s 0.7.3 [ 12316182 ]
          Sylvain Lebresne made changes -
          Sylvain Lebresne made changes -
          Attachment 0001-Add-compositeType-and-DynamicCompositeType-v4.patch [ 12478593 ]
          Sylvain Lebresne made changes -
          Attachment 0001-Add-compositeType-and-DynamicCompositeType-v4.patch [ 12478593 ]
          Sylvain Lebresne made changes -
          Sylvain Lebresne made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Reviewer edanuff
          Resolution Fixed [ 1 ]
          donal zang made changes -
          Comment [ No, there's no bytes remaining after 0x01.
          The exception is raised in the validate(ByteBuffer bytes) function:

          215 byte b = bb.get();
          216 if (b != 0 && bb.remaining() != 0)
          217 throw new MarshalException("Invalid bytes remaining after an end-of-component at component" +i);

          that means if the byte is not 0x00, then this Exception will be raised?

          correct me if I am wrong ]
          Gavin made changes -
          Workflow no-reopen-closed, patch-avail [ 12599799 ] patch-available, re-open possible [ 12749759 ]
          Gavin made changes -
          Workflow patch-available, re-open possible [ 12749759 ] reopen-resolved, no closed status, patch-avail, testing [ 12754407 ]
          Gavin made changes -
          Link This issue depends on CASSANDRA-2355 [ CASSANDRA-2355 ]
          Gavin made changes -
          Link This issue depends upon CASSANDRA-2355 [ CASSANDRA-2355 ]

            People

            • Assignee:
              Sylvain Lebresne
              Reporter:
              Ed Anuff
              Reviewer:
              Ed Anuff
            • Votes:
              10 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development