I am using this version :
[cqlsh 6.1.0 | Cassandra 3.0.8 | CQL spec 3.3.1 | Native protocol v4]
and have this following udt and table schema :
CREATE TYPE notificationstore.fcm_details (
app_version_code int,
client_type text,
created_at bigint,
updated_at bigint
);
CREATE TABLE anonymous_fcm_record (
user_id text PRIMARY KEY,
fcm_detail_map map<text, frozen<fcm_details>>
) WITH compaction = {
'class': 'SizeTieredCompactionStrategy'
};
I want to use this CQL query in ScyllaDB Java driver (fetch the fcm_details for the provided userId and fcmToken) :
SELECT fcm_detail_map[:fcmToken]
FROM anonymous_fcm_record
WHERE user_id = :userId
By creating this Select query and SimpleStatement :
Select selectQuery = QueryBuilder.selectFrom("anonymous_fcm_record")
.element(CqlIdentifier.fromCql("fcm_detail_map"), QueryBuilder.bindMarker("fcmToken"))
.whereColumn("user_id").isEqualTo(QueryBuilder.bindMarker("user_id"));
return selectQuery.build();
I also tried using Selector
in-place of CqlIdentifier
.
But in both the scenarios I was getting this error :
no viable alternative at input 'fcm_detail_map'
Is it possible to serve the use-case with the existing version or any further releases or it’s not yet supported in ScyllaDB?