Dong Li created HAWQ-231:
----------------------------

             Summary: Alter table by drop all columns of it, then it has some 
interesting problems
                 Key: HAWQ-231
                 URL: https://issues.apache.org/jira/browse/HAWQ-231
             Project: Apache HAWQ
          Issue Type: Improvement
          Components: Storage
            Reporter: Dong Li
            Assignee: Lei Chang


It is a design behavior problem. 
When we drop all the columns, should it truncate the table?
Otherwise if the count of invisible rows has meaning.
You can not see anything, but it shows that there are 1000 rows here.
I know that in storage view and design view it is ok.
But in  user view, it may be puzzled.
{code}
intern=# create table alterall (i int, j int);
CREATE TABLE
intern=# insert into alterall VALUES 
(generate_series(1,1000),generate_series(1,2));
INSERT 0 1000
intern=# alter table alterall drop COLUMN i;
ALTER TABLE
intern=# alter TABLE alterall drop COLUMN j;
ALTER TABLE
intern=# select * from alterall ;
--
(1000 rows)
intern=# alter TABLE alterall add column k int default 3;
ALTER TABLE
intern=# select * from alterall;
 k
---
 3
 3
 3
 3
 3
 3
 3
...
(1000 rows)
{code}



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

Reply via email to