WARN:src/prepared.cpp:54:cass\3a\3aPrepared\3a\3aPrepared(const cass\3a\3aResultResponse*, const std\3a\3astring&, const std\3a\3avector<std\3a\3abasic_string<char, std\3a\3achar_traits<char>, std\3a\3aallocator<char> >, std\3a\3aallocator<std\3a\3abasic_string<char, std\3a\3achar_traits<char>, std\3a\3aallocator<char> > > >&):Unable to find key column 'key' in prepared query
I was not getting this error when using Cassandra version 2.1.8.
Is this any issue with the way we use prepare query?
I need to understand more about this warning so that if required we can eliminate this issue.
More Details:
---------------
Table Definition:
CREATE TABLE if not exists keyspace1.tbl1 (
id bigint,
attrid text,
attrvalue blob,
PRIMARY KEY(id, attrid)
) WITH compaction = { 'class' : 'LeveledCompactionStrategy' };
The warning comes when we use following query string and send it to prepare -
INSERT INTO tbl1 ("id", "attrid", "attrvalue") VALUES (?, ?, ?) USING TIMESTAMP ?
We are getting this error after calling cass_future_get_prepared function
Appreciate help here.
Thanks,
Prerana
To unsubscribe from this group and stop receiving emails from it, send an email to cpp-driver-us...@lists.datastax.com.
I have the same issue; it seems the error comes from the method that tries to get the indices of the key columns. This method relies on a "key_aliases" field in the schema metadata, that does not exist (was it removed with C* 2.2?)
Looking at the sources of the java driver, it should instead rely on the "partition_key" type of the columns metadata. Something like:
for (auto it: columns_) {
if (it.second.get_field("type")->value()->to_string() == "partition_key")
output->push_back(it.first);
}
Etienne