Details
-
Bug
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
Normal
Description
The following behavior was identified running Cassandra 3.10
I have the following trigger:
public class TestTrigger implements ITrigger { @Override public Collection<Mutation> augment(final Partition update) { final UnfilteredRowIterator it = update.unfilteredIterator(); while (it.hasNext()) { final Unfiltered un = it.next(); final Clustering clt = (Clustering) un.clustering(); final Row row = update.getRow(clt); final Iterator<Cell> cls = row.cells().iterator(); while (cls.hasNext()) { final Cell cell = cls.next(); System.out.println(cell.column().name.toString() + " " + cell.column().cellValueType().getClass() + " " + cell.column().cellValueType().compose(cell.value())); } } return Collections.emptyList(); } }
Configured for the following table:
CREATE TABLE IF NOT EXISTS audit_app_log ( id text, log_time timestamp, mappings map<text,frozen<list<text>>>, PRIMARY KEY((id),log_time) ) AND CLUSTERING ORDER BY (log_time DESC);
When I insert data into this table, I have the following output:
mappings class org.apache.cassandra.db.marshal.ListType ["test"]
This output means that I am losing the key from the map, and seeing only the internal data structure. Am I doing something wrong or this is really a bug?