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

Unable to delete multiple entries using In clause on clustering part of compound key

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Low
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      I have the following table:

      CREATE TABLE user_relation (
      u1 bigint,
      u2 bigint,
      mf int,
      i boolean,
      PRIMARY KEY (u1, u2));

      And I'm trying to delete two entries using In clause on clustering part of compound key and I fail to do so:

      cqlsh:bm> DELETE from user_relation WHERE u1 = 755349113 and u2 in (100003404014120, 100002537242743);
      Bad Request: Invalid operator IN for PRIMARY KEY part u2

      Although the select statement works just fine:

      cqlsh:bm> select * from user_relation WHERE u1 = 755349113 and u2 in (100003404014120, 100002537242743);

      u1 | u2 | i | mf
      -----------------------------+---
      755349113 | 100002537242743 | null | 27
      755349113 | 100003404014120 | null | 0

      (2 rows)

      Attachments

        Issue Links

          Activity

            People

              blerer Benjamin Lerer
              ashotik@gmail.com Ashot Golovenko
              Benjamin Lerer
              Votes:
              9 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: