Is there a way to use short and byte values in CQL? I've defined a table with int fields and can store and read short and byte values from there, but if I try to bind a value in a prepared statement, I get an error. I also tried varint, but still no luck. That's the exception I get:
Invalid type for value 1 of CQL type varint, expecting class java.math.BigInteger but class java.lang.Byte provided
Here's the table definition:
CREATE TABLE "Timeline" (
"BucketID" varchar,
"CreationTime" timestamp,
"Attr01" varint,
"Attr02" bigint,
"Attr03" varint,
"Attr04" varint,
"Attr05" uuid,
"Message" text,
PRIMARY KEY (("BucketID", "Attr01"), "CreationTime", "Attr02", "Attr03", "Attr04", "Attr05")
) WITH COMPACT STORAGE AND CLUSTERING ORDER BY ("CreationTime" DESC);
Is there a way to use shorts/bytes, instead of always casting/creating integers?