phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanooj Padmakumar <p.san...@gmail.com>
Subject Re: Views and alter table
Date Thu, 13 Oct 2016 14:18:50 GMT
Hi James,

I managed to reproduce this.

create table test1(key1 varchar not null,key2 varchar not null,"p".val1
varchar,CONSTRAINT pk PRIMARY KEY(key1,key2)) Compression = 'SNAPPY'

ALTER TABLE test1 ADD "p".val2 varchar,"p".val3 varchar,"p".val4 varchar

create view test_view1(key2 varchar,val1 varchar, val2 varchar,val3
varchar,val4 varchar) AS select * from test1 where key1='key1'

ALTER TABLE test1 ADD "p".val5 varchar

After the last step I get
Error: ERROR 1010 (42M01): Not allowed to mutate table. Cannot drop column
referenced by VIEW columnName=TEST1
SQLState:  42M01
ErrorCode: 1010

I was trying to create the table with a java program and that time it wasnt
reproducible today I tried the steps with Squirrel client and I could
reproduce this. (Hope this helps)

We are using 4.5.2 of Phoenix.

Thanks
Sanooj

On Fri, Oct 7, 2016 at 8:32 PM, James Taylor <jamestaylor@apache.org> wrote:

> Hi Sanjooj,
> What version of Phoenix? Would you mind filing a JIRA with steps to
> reproduce the issue?
> Thanks,
> James
>
>
> On Friday, October 7, 2016, Sanooj Padmakumar <p.sanooj@gmail.com> wrote:
>
>> Hi All
>>
>> We get mutation state related error when we try altering a table to which
>> views are added. We always have to drop the view before doing the alter. Is
>> there a way we can avoid this?
>>
>> Thanks
>> Sanooj
>>
>


-- 
Thanks,
Sanooj Padmakumar

Mime
View raw message