Cassandra
  1. Cassandra
  2. CASSANDRA-3781

CQL support for changing row key type in ALTER TABLE

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Fix Version/s: 1.1.0
    • Component/s: None
    • Labels:

      Description

      There is currently no way to alter the key_validation_class from CQL. jbellis suggested that this could be done by being able to ALTER the type of the KEY alias.

      1. 3781.patch
        3 kB
        Sylvain Lebresne

        Activity

        Hide
        Sylvain Lebresne added a comment -

        No, I've opened CASSANDRA-4041 to fix that part.

        Show
        Sylvain Lebresne added a comment - No, I've opened CASSANDRA-4041 to fix that part.
        Hide
        Jonathan Ellis added a comment -

        Is there a reason we can't support changing the components of a composite comparator as well?

        Show
        Jonathan Ellis added a comment - Is there a reason we can't support changing the components of a composite comparator as well?
        Hide
        Sylvain Lebresne added a comment -

        Oops, tanks for catching that. Committed with the substitution.

        Show
        Sylvain Lebresne added a comment - Oops, tanks for catching that. Committed with the substitution.
        Hide
        paul cannon added a comment -

        Sylvain- it looks like this patch changes the default_validation_class instead of the key_validation_class in the cql2 case. The default_validation_class can already be changed through CQL.

        Other than that one s/setDefault/setKey/ change, +1

        Show
        paul cannon added a comment - Sylvain- it looks like this patch changes the default_validation_class instead of the key_validation_class in the cql2 case. The default_validation_class can already be changed through CQL. Other than that one s/setDefault/setKey/ change, +1
        Hide
        Jonathan Ellis added a comment -

        (specifically, the former affects storage order on disk which is why it's dangerous. the latter does not.)

        Show
        Jonathan Ellis added a comment - (specifically, the former affects storage order on disk which is why it's dangerous. the latter does not.)
        Hide
        Jonathan Ellis added a comment -

        column comparator != key validator

        Show
        Jonathan Ellis added a comment - column comparator != key validator
        Hide
        paul cannon added a comment -

        I thought we just decided recently that it was too dangerous to allow changing the key comparator?

        Show
        paul cannon added a comment - I thought we just decided recently that it was too dangerous to allow changing the key comparator?
        Hide
        Sylvain Lebresne added a comment -

        I hope Paul won't mind but it's a two line change so patch attached against 1.1 for both cql 2.0 and cql 3.0. Pretty sure the cql 2.0 part can trivially be applied to 1.0.

        Show
        Sylvain Lebresne added a comment - I hope Paul won't mind but it's a two line change so patch attached against 1.1 for both cql 2.0 and cql 3.0. Pretty sure the cql 2.0 part can trivially be applied to 1.0.

          People

          • Assignee:
            Sylvain Lebresne
            Reporter:
            Rick Branson
            Reviewer:
            paul cannon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development