Cassandra无法格式化值OrderedMapSerializedKey

时间:2017-01-03 23:23:06

标签: cassandra

我正在阅读文章:http://christopher-batey.blogspot.com.br/2015/05/cassandra-aggregates-min-max-avg-group.html

我有以下功能和聚合

CREATE OR REPLACE FUNCTION group_data( state Map<text, int>, type text )
CALLED ON NULL INPUT
RETURNS Map<text, int>
LANGUAGE java AS '
Integer count = (Integer) state.get(type);  if (count == null) count = 1; else count++; state.put(type, count); return state; ' ;

CREATE OR REPLACE AGGREGATE group_and_count(text) 
SFUNC group_data 
STYPE Map<text, int> 
INITCOND {};

但是当我运行命令时: cqlsh:&gt;从test中选择group_and_count(name); 我收到以下错误:格式化值无法OrderedMapSerializedKey([(u'gleydson',4)]):'NoneType'对象没有属性'sub_types'< /强>

0 个答案:

没有答案