cassandra udt:将新字段添加到udt类型时,列仅显示旧的udt类型数据 [英] cassandra udt: when adding a new field into udt type, columns only shows old udt type data
问题描述
我在cassandra中创建了udt类型。
->成员(名称文本)。
I have created a udt type in cassandra. --> member(name text).
然后我创建一个表 users,其中 members列之一是list>。
Then I create a table "users" and one of columns "members" is list>.
我在用户
类型中添加了另一个字段年龄,所以现在是member(name文本,age int)。
I add an another field age into type user So now is member(name text, age int).
我将数据[{name:'james',age:1}]插入表 users中。但是当我执行查询时,它仅显示[{name:‘james’}}。
我已经运行了DESC KEYSPACE,并且类型与成员(名称文本,age int)完全相同。
I insert data [{name: 'james', age: 1}] into table "users". But it only shows [{name:'james'}] when I do a query. I have run DESC KEYSPACE, and the type is exactly as member(name text, age int). Any suggestions?
PS:我的cassandra版本是2.1.3
PS: my cassandra version is 2.1.3
推荐答案
这是一个已知的错误( CASSANDRA-9188 )。您需要重新启动cqlsh会话,以使其使用最新的类型定义。
This is a known bug (CASSANDRA-9188). You need to restart your cqlsh session to make it use the latest type definition.
这篇关于cassandra udt:将新字段添加到udt类型时,列仅显示旧的udt类型数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!