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

DateType (timestamp type in CQL3) does not sort pre-'unix epoch' dates correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 2.0 beta 1
    • None
    • None
    • Normal

    Description

      • this bug can be confirmed by fellow:

      1.create table like fellow:

      create table test2 (
      id varchar,
      c varchar,
      create_date timestamp,
      primary key(id)
      );

      create index idx_test2_c on test2 (c);
      create index idx_test2_create_date on test2 (create_date);

      2.insert data like fellow;

      cqlsh:pgl> update test2 set create_date='1950-01-01', c='1' where id='111';
      cqlsh:pgl> update test2 set create_date='1917-01-01', c='1' where id='111';
      cqlsh:pgl> update test2 set create_date='2013-01-01', c='1' where id='111';

      3.select data :
      cqlsh:pgl> select * from test2 where c='1' and create_date>'2011-01-01 12:00:01' ALLOW FILTERING ;

      id | c | create_date
      ------------------------------
      111 | 1 | 2012-12-31 15:00:00+0000

      4. add data:
      update test2 set create_date='1917-05-01', c='1' where id='111';

      5.select data:
      cqlsh:pgl> select * from test2 where c='1' and create_date>'2011-01-01 12:00:01' ALLOW FILTERING ;

      id | c | create_date
      ------------------------------
      111 | 1 | 1917-04-30 15:00:00+0000

      the search result is not right!
      it should be fellow:

      id | c | create_date
      ------------------------------
      111 | 1 | 2012-12-31 15:00:00+0000

      Attachments

        1. 5723.txt
          16 kB
          Sylvain Lebresne

        Issue Links

          Activity

            People

              slebresne Sylvain Lebresne
              zhouhero zhouhero
              Sylvain Lebresne
              Jonathan Ellis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: