incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivek Mishra <mishra.v...@gmail.com>
Subject timeuuid with CQL
Date Tue, 09 Oct 2012 07:29:48 GMT
I have an issue with timeuuid with CQL3(cassandra 1.1.2)

********************************************************************************************************************************************
CREATE TABLE altercations_uuid (
       instigator uuid,
       started_at timestamp,
       ships_destroyed timeuuid,
       energy_used float,
       alliance_involvement boolean,
       PRIMARY KEY (instigator,started_at,ships_destroyed)
   );

/
INSERT INTO altercations_uuid (instigator, started_at, ships_destroyed,
                             energy_used, alliance_involvement)
                     VALUES (123456, '2012-07-23', 2, 4.6, 'false');

/

select * from altercations_uuid;

 instigator                           | started_at               |
ships_destroyed          | alliance_involvement | energy_used
--------------------------------------+--------------------------+--------------------------+----------------------+-------------
 5d172400-1dd2-11b2-0000-242d50cf1fb5 | 2012-07-23 00:00:00+0000 |
1970-01-01 05:30:00+0000 |                False |         4.6


********************************************************************************************************************************************

As ships_destroyed is of timeuuid data type, and i tried inserting it as 2,
it gets defaulted to "1970-01-01 05:30:00+0000".

Is this cassandra's default behaviour on timeuuid type? Even if data itself
is not correct?

Any idea?

-Vivek

Mime
View raw message