You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hawq.apache.org by "Lei Chang (JIRA)" <ji...@apache.org> on 2016/01/24 03:13:39 UTC

[jira] [Updated] (HAWQ-231) Alter table by drop all columns of it, then it has some interesting problems

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

Lei Chang updated HAWQ-231:
---------------------------
    Fix Version/s: backlog

> 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
>             Fix For: backlog
>
>
> 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)