[jira] [Comment Edited] (PHOENIX-1409) Allow ALTER TABLE SET command to update HTableDescriptor and HColumnDescriptor properties

Fri, 02 Jan 2015 14:58:09 -0800

    [ 
https://issues.apache.org/jira/browse/PHOENIX-1409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14262400#comment-14262400
 ] 

Alicia Ying Shu edited comment on PHOENIX-1409 at 1/2/15 10:56 PM:
-------------------------------------------------------------------

[~jamestaylor] Patch v3 failed on the following TTL case:

create table T (col1 varchar primary key);
alter table T set TTL = 30;    

It did not set the TTL to be 30 since existingColumnFamilies.isEmpty() when 
there is only default column family. I added the following code to fix it 
(there could be other way to get the existing column family including default 
one):

if (existingColumnFamilies.isEmpty() && newColumnFamiliesToBeAdded.isEmpty() && 
!commonFamilyProps.isEmpty()) {
                        
allFamiliesProps.put(QueryConstants.DEFAULT_COLUMN_FAMILY, commonFamilyProps);
                } 

if tableProps is empty, handled the getting the newTableDesc inside 
setTTLForNewColumnFamilies() when it is used. I can move it outside. 
Patch v4 passed all the mvn tests. Will modify some more as suggested. 


was (Author: aliciashu):
[~jamestaylor] Patch v3 failed on the following TTL case:

create table T (col1 varchar primary key);
alter table T set TTL = 30;    

It did not set the TTL to be 30 since existingColumnFamilies.isEmpty() when 
there is only default column family. I added the following code to fix it 
(there could be other way to get the existing column family including default 
one):

if (existingColumnFamilies.isEmpty() && newColumnFamiliesToBeAdded.isEmpty() && 
!commonFamilyProps.isEmpty()) {
                        
allFamiliesProps.put(QueryConstants.DEFAULT_COLUMN_FAMILY, commonFamilyProps);
                } 

Patch v4 passed all the mvn tests. Will modify some more as suggested. 

> Allow ALTER TABLE <table> SET command to update HTableDescriptor and 
> HColumnDescriptor properties
> -------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-1409
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1409
>             Project: Phoenix
>          Issue Type: Improvement
>    Affects Versions: 4.2
>            Reporter: James Taylor
>            Assignee: Alicia Ying Shu
>         Attachments: PHOENIX-1409-v3.patch, Phoenix-1409-v1.patch, 
> Phoenix-1409-v4.patch, Phoenix-1409.patch, WIP.patch, phoenix-1409-v2.patch
>
>
> Once PHOENIX-1408 is fixed, we should allow HTableDescriptor and 
> HColumnDescriptor properties through the ALTER TABLE <table> SET command. 
> It'd just be a matter of passing these properties through the existing 
> methods, as we support this for CREATE TABLE.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to