I try to use CQL3 to create CF with composite columns, CREATE TABLE Friends ( ... user_id bigint, ... friend_id bigint, ... status int, ... source int, ... created timestamp, ... lastupdated timestamp, ... PRIMARY KEY (user_id, friend_id, status, source) ... );
When I check it with cli, the composite type is a bit odd, why it's defined as Long, Int32, Int32, UTF8, is it supposed to be Long, Long, Int32, Int32? Did I do something wrong? describe friends; ColumnFamily: friends Key Validation Class: org.apache.cassandra.db.marshal.LongType Default column value validator: org.apache.cassandra.db.marshal.UTF8Type Columns sorted by: org.apache.cassandra.db.marshal.CompositeType( org.apache.cassandra.db.marshal.LongType, org.apache.cassandra.db.marshal.Int32Type, org.apache.cassandra.db.marshal.Int32Type, org.apache.cassandra.db.marshal.UTF8Type) GC grace seconds: 864000 Compaction min/max thresholds: 4/32 Read repair chance: 0.1 DC Local Read repair chance: 0.0 Replicate on write: true Caching: KEYS_ONLY Bloom Filter FP chance: default Built indexes: [] Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy Compression Options: sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor Thanks. -Wei