[ 
https://issues.apache.org/jira/browse/PHOENIX-7199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikita Pande updated PHOENIX-7199:
----------------------------------
    Description: 
I cannot modify the default value of an existing column in Apache Phoenix.

If I need to change the default value of a column, I have to create a new table 
with the desired schema and migrate the data from the old table to the new one.

I think to modify column level DEFAULT, 
https://issues.apache.org/jira/browse/PHOENIX-4815 needs to be fixed
Refernce from IBM DB2

{code:java}
ALTER TABLE MYEMP ALTER COLUMN JOB SET DEFAULT 'PENDING'
{code}



  was:
I cannot modify the default value of an existing column in Apache Phoenix.

If I need to change the default value of a column, I have to create a new table 
with the desired schema and migrate the data from the old table to the new one.

I think to modify column level DEFAULT, 
https://issues.apache.org/jira/browse/PHOENIX-4815 needs to be fixed


> Support declaration of DEFAULT in ALTER statement
> -------------------------------------------------
>
>                 Key: PHOENIX-7199
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7199
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Nikita Pande
>            Priority: Major
>
> I cannot modify the default value of an existing column in Apache Phoenix.
> If I need to change the default value of a column, I have to create a new 
> table with the desired schema and migrate the data from the old table to the 
> new one.
> I think to modify column level DEFAULT, 
> https://issues.apache.org/jira/browse/PHOENIX-4815 needs to be fixed
> Refernce from IBM DB2
> {code:java}
> ALTER TABLE MYEMP ALTER COLUMN JOB SET DEFAULT 'PENDING'
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to