it seems like adding a new column on the fly doesnt work in Cassandra CQL3; say i have this table:
cqlsh:Keyspace2> select * from users;
user_name | birth_year | gender | password | session_token | state
-----------+------------+--------+------------+---------------+-------
jsmith | 1968 | null | ch@ngem3a | null | null
jsmith2 | 1963 | null | ch@ngem3a2 | null | null
cqlsh:Keyspace2> insert into users (user_name, x) values ('jsmith',100);
>Bad Request: Unknown identifier x
Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.
but the warning is correct, the same thing works when i go to CQL2:
> Blockquote
cqlsh:Keyspace2> exit
[root@bdvm1 ~]# cqlsh
Connected to Test Cluster at localhost:9160.
[cqlsh 2.2.0 | Cassandra 1.1.9-dse-2.2.2-SNAPSHOT | CQL spec 2.0.0 | Thrift protocol 19.33.0]
Use HELP for help.
cqlsh> use Keyspace1;
cqlsh:Keyspace1> select * from users;
KEY | birth_year | gender
-------+------------+--------
TEST | 1968 | m
TEST1 | 1968 | f
cqlsh:Keyspace1> insert into users (KEY, x) values ('jsmith',100);
cqlsh:Keyspace1> select * from users;
KEY,TEST | birth_year,1968 | gender,m
KEY,TEST1 | birth_year,1968 | gender,f
KEY,jsmith | x,100
Does anyone know why ? I would have thought CQL3 was backwards compatible ..
thanks, Matt