I store my data in Cassandra NoSQL database with the following schema:
CREATE TABLE bidding3(
item_id bigint,
user_id bigint,
bid_price bigint,
current_time text,
PRIMARY KEY (item_id,current_time)
) WITH CLUSTERING ORDER BY (current_time,DESC);
CREATE TABLE bidding_user(
item_id bigint,
user_id bigint,
bid_price bigint,
current_time text,
PRIMARY KEY (user_id,current_time)
) WITH CLUSTERING ORDER BY (current_time,DESC);
And then I use
SELECT * FROM bidding_user LIMIT 5;.
I would expect the data is arranged in time-series and it did for the first day, but things changed today.
Wed Jul 06 20:09:04 UTC 2016
Wed Jul 06 19:10:04 UTC 2016
Thu Jul 07 19:09:04 UTC 2016.
I think the database ignores the date but only care about the time.
Any idea how to fix this?