【发布时间】:2018-10-28 10:41:14
【问题描述】:
Cassandra 地图实现是 Map 还是 MultiMap?换句话说,Cassandra 是否允许映射类型中的重复键?基于this example,如果我调用了
UPDATE cycling.cyclist_teams SET teams = teams + {2009 : 'First team'} WHERE id = 5b6962dd-3f90-4c93-8f61-eabfa4a803e2;
然后
UPDATE cycling.cyclist_teams SET teams = teams + {2009 : 'Second team'} WHERE id = 5b6962dd-3f90-4c93-8f61-eabfa4a803e2;
那么数据库将如下所示:A)
teams[2009]: 'Second team'
或者这个:B)
teams[2009]: 'First team'
teams[2009]: 'Second team'
【问题讨论】:
标签: collections cassandra hashmap cassandra-3.0