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

CQL should be able to do a delete with a > or < operator on a clustering portion of a primary key

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • 2.1 beta1
    • Legacy/CQL
    • None

    Description

      The following creates a table that at the storage engine level, has "key" as the row key, and evt as a time ordered list of columns within the row:
      create table test (key text, evt timestamp, primary key(key,evt)) with clustering order by (evt asc);

      Given the ability to create slice tombstones (both implicitly by deleting collections and supercolumns) as well as in thrift through a delete with a slice predicate.
      Given the schema above, the expected syntax to delete all columns with key "one" and timestamp less than 1000 would be:
      delete from test where key='one' and evt < 1000;
      and if you did that as well as
      delete from test where key='one' and evt > 1000;
      You would accomplish exactly what is being asked about (in terms of thrift and astyanax) here:
      http://stackoverflow.com/questions/19747005/delete-all-the-columns-and-its-data-except-for-one-columns-using-astyanax-client

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jbellis Jonathan Ellis Assign to me
            tupshin Tupshin Harper
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment