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

SELECT ... LIMIT offset by 1 with static columns

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.0.7
    • Component/s: None
    • Labels:
      None
    • Environment:

      cqlsh 4.1.1 | Cassandra 2.0.6 | CQL spec 3.1.1

    • Severity:
      Normal
    • Since Version:

      Description

      First, repro case:

      cqlsh:test> create table test ( pk1 text, pk2 timeuuid, data1 text static, data2 text, PRIMARY KEY( pk1, pk2 ) );
      cqlsh:test> update test set data1 = 'data1', data2 = 'data2' where pk1 = 'pk1' and pk2 = now();
      cqlsh:test> update test set data1 = 'data1', data2 = 'data2' where pk1 = 'pk1' and pk2 = now();
      cqlsh:test> select * from test limit 1;
      
       pk1 | pk2  | data1 | data2
      -----+------+-------+-------
       pk1 | null | data1 |  null
      
      (1 rows)
      
      cqlsh:test> select * from test limit 2;
      
       pk1 | pk2                                  | data1 | data2
      -----+--------------------------------------+-------+-------
       pk1 | 9b068ee0-b8b0-11e3-a345-49baa9ac32e6 | data1 | data2
      
      (1 rows)
      
      cqlsh:test> select * from test limit 3;
      
       pk1 | pk2                                  | data1 | data2
      -----+--------------------------------------+-------+-------
       pk1 | 9b068ee0-b8b0-11e3-a345-49baa9ac32e6 | data1 | data2
       pk1 | 0af67a40-b8ba-11e3-a345-49baa9ac32e6 | data1 | data2
      
      (2 rows)
      

      I think that: 1) if this is a static columns feature it should be documented so I can use it safely or 2) it should be fixed (return 2 rows with limit 2 for query above).

        Attachments

        1. 6956.txt
          2 kB
          Sylvain Lebresne

          Activity

            People

            • Assignee:
              slebresne Sylvain Lebresne
              Reporter:
              pashka Pavel Eremeev
              Authors:
              Sylvain Lebresne
              Reviewers:
              Aleksey Yeschenko
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: