Re: Drop and Add column with different datatype in Cassandra

2016-03-29 Thread Tyler Hobbs
On Tue, Mar 29, 2016 at 10:31 AM, Bhupendra Baraiya <
bhupendra.bara...@continuum.net> wrote:

> Does it mean Cassandra does not allow adding of the same column in the
> Table even though it does not exists in the Table
>

As the error message says, you can't re-add a *collection* column with the
same name.  Other types of columns are fine.


-- 
Tyler Hobbs
DataStax 


Drop and Add column with different datatype in Cassandra

2016-03-29 Thread Bhupendra Baraiya
Hi ,

I am using Cassandra 3.0.4
I am using a Table called User which has a column last_login with Map datatype .

I dropped the column using the  syntax Alter Table User Drop last_login;

I dropped the column from table and recreated it with a nested datatype 
last_login map>>
But then I got an below error

InvalidRequest: code=2200 [Invalid query] message="Cannot add a collection with
the name last_login because a collection with the same name and a different type
(map) has already been used in the past"

Does it mean Cassandra does not allow adding of the same column in the Table 
even though it does not exists in the Table

Thanks and regards,

Bhupendra Baraiya
Continuum Managed Services, LLC.
p: 902-933-0019
e: bhupendra.bara...@continuum.net
w: continuum.net
[http://cdn2.hubspot.net/hub/281750/file-393087232-png/img/logos/email-continuum-logo-151x26.png]