Cassandra
  1. Cassandra
  2. CASSANDRA-4936

Less than operator when comparing timeuuids behaves as less than equal.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Fix Version/s: 1.2.1
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Linux CentOS.

      Linux localhost.localdomain 2.6.18-308.16.1.el5 #1 SMP Tue Oct 2 22:01:37 EDT 2012 i686 i686 i386 GNU/Linux

      Description

      If we define the following column family using CQL3:

      CREATE TABLE useractivity (
      user_id int,
      activity_id 'TimeUUIDType',
      data text,
      PRIMARY KEY (user_id, activity_id)
      );

      Add some values to it.

      And then query it like:

      SELECT * FROM useractivity WHERE user_id = '3' AND activity_id < '2012-11-07 18:18:22-0800' ORDER BY activity_id DESC LIMIT 1;

      the record with timeuuid '2012-11-07 18:18:22-0800' returns in the results.

      According to the documentation, on CQL3 the '<' and '>' operators are strict, meaning not inclusive, so this seems to be a bug.

      1. 4936.txt
        24 kB
        Sylvain Lebresne

        Activity

        Gavin made changes -
        Workflow patch-available, re-open possible [ 12753817 ] reopen-resolved, no closed status, patch-avail, testing [ 12759000 ]
        Gavin made changes -
        Workflow no-reopen-closed, patch-avail [ 12733324 ] patch-available, re-open possible [ 12753817 ]
        Sylvain Lebresne made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Tyler Hobbs made changes -
        Reviewer thobbs
        Sylvain Lebresne made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Assignee Sylvain Lebresne [ slebresne ]
        Sylvain Lebresne made changes -
        Attachment 4936.txt [ 12564408 ]
        Sylvain Lebresne made changes -
        Attachment 4936.txt [ 12564407 ]
        Sylvain Lebresne made changes -
        Fix Version/s 1.2.1 [ 12322953 ]
        Fix Version/s 1.2.2 [ 12323924 ]
        Sylvain Lebresne made changes -
        Attachment 4936.txt [ 12564407 ]
        Jonathan Ellis made changes -
        Field Original Value New Value
        Fix Version/s 1.2.2 [ 12323924 ]
        Affects Version/s 0.8.0 [ 12316403 ]
        Affects Version/s 1.1.6 [ 12323257 ]
        Cesar Lopez-Nataren created issue -

          People

          • Assignee:
            Sylvain Lebresne
            Reporter:
            Cesar Lopez-Nataren
            Reviewer:
            Tyler Hobbs
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development