I am trying to understand the type used when creating composite columns.
I use CQL3 (via cqlsh) to create a CF, and then the CLI to issue a description command. Types in columns sorted by: ... CompositeType (Type1, Type2, ...) are not the ones I expect.
I am using Cassandra 1.1.6.
CREATE TABLE CompKeyTest1 (
KeyA int,
KeyB int,
KeyC int,
MyData varchar,
PRIMARY KEY (KeyA, KeyB, KeyC)
);
Returned CompositeType -
CompositeType(Int32,Int32,UTF8)
Should it be (Int32, Int32, Int32)?
CREATE TABLE CompKeyTest2 (
KeyA int,
KeyB varchar,
KeyC int,
MyData varchar,
PRIMARY KEY (KeyA, KeyB, KeyC)
);
Returned CompositeType -
CompositeType(UTF8,Int32,UTF8)
Why is this not the same as the types used to define the table? I probably missed something basic in type assignment ...
Thank!
source
share