XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.4
    • Legacy/CQL

    Description

      Dense composite supports adding records where only a prefix of all the component specifying the key is defined. In other words, with:

      CREATE TABLE connections (
         userid int,
         ip text,
         port int,
         protocol text,
         time timestamp,
         PRIMARY KEY (userid, ip, port, protocol)
      ) WITH COMPACT STORAGE
      

      you can insert

      INSERT INTO connections (userid, ip, port, time) VALUES (2, '192.168.0.1', 80, 123456789);
      

      You cannot however select that column specifically (i.e, without selecting column (2, '192.168.0.1', 80, 'http') for instance).
      This ticket proposes to allow that though 'null', i.e. to allow

      SELECT * FROM connections WHERE userid = 2 AND ip = '192.168.0.1' AND port = 80 AND protocol = null;
      

      It would then also make sense to support:

      INSERT INTO connections (userid, ip, port, protocol, time) VALUES (2, '192.168.0.1', 80, null, 123456789);
      

      as an equivalent to the insert query above.

      Attachments

        1. 3783-v2.patch
          11 kB
          Michał Michalski
        2. 3783-v3.patch
          11 kB
          Michał Michalski
        3. 3783-v4.txt
          12 kB
          Sylvain Lebresne
        4. 3783-v5.txt
          11 kB
          Aleksey Yeschenko
        5. 3783-wip-v1.patch
          2 kB
          Michał Michalski

        Issue Links

          Activity

            People

              michalm Michał Michalski
              slebresne Sylvain Lebresne
              Michał Michalski
              Aleksey Yeschenko
              Votes:
              4 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: