Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4329

CQL3: Always use composite types by default

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 1.2.0 beta 1
    • Component/s: None
    • Labels:

      Description

      Currently, when defining a table with a single (non-composite) PRIMARY KEY, we don't use a CompositeType in the underlying comparator. This is however a problem for CASSANDRA-3647 as this means those tables cannot use collections. So this ticket suggests to change that default behavior, and to always use (by default at least, see below) a composite comparator underneath. I'll note that doing so will mean an overhead of 3 bytes per column for non-composite columns, but I believe getting collection is well worth it.

      Of course the suggestion above apply to the default behavior and this ticket would also add an option to table creation to get back to the current behavior of not using a composite comparator (if ony for backward compatibility sake). And I believe that we can actually reuse 'COMPACT STORAGE' for that.

        Attachments

        1. 4329_fix.txt
          2 kB
          Sylvain Lebresne
        2. 4329.txt
          25 kB
          Sylvain Lebresne

          Issue Links

            Activity

              People

              • Assignee:
                slebresne Sylvain Lebresne
                Reporter:
                slebresne Sylvain Lebresne
                Authors:
                Sylvain Lebresne
                Reviewers:
                Pavel Yaskevich
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: