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

Raymond Xu updated HUDI-3236:
-----------------------------
    Description: 
{code:sql}
create table if not exists cow_nonpt_nonpcf_tbl (
  id int,
  name string,
  price double
) using hudi
options (
  type = 'cow',
  primaryKey = 'id'
);

insert into cow_nonpt_nonpcf_tbl select 1, 'a1', 20;

ALTER TABLE cow_nonpt_nonpcf_tbl alter column id comment "primary id";

DESC cow_nonpt_nonpcf_tbl;

-- this works fine so far

ALTER TABLE cow_nonpt_nonpcf_tbl alter column name comment "name column";

DESC cow_nonpt_nonpcf_tbl;

-- this saves the comment for name column
-- but comment for id column was reverted back to NULL

{code}


  was:

{code:sql}
create table if not exists cow_nonpt_nonpcf_tbl (
  id int,
  name string,
  price double
) using hudi
options (
  type = 'cow',
  primaryKey = 'id'
);

insert into cow_nonpt_nonpcf_tbl select 1, 'a1', 20;

ALTER TABLE cow_nonpt_nonpcf_tbl alter column id comment "primary id";

-- this works fine so far

ALTER TABLE cow_nonpt_nonpcf_tbl alter column name comment "name column";

-- this saves the comment for name column
-- but comment for id column was reverted back to NULL

{code}



> ALTER TABLE COMMENT old comment gets reverted
> ---------------------------------------------
>
>                 Key: HUDI-3236
>                 URL: https://issues.apache.org/jira/browse/HUDI-3236
>             Project: Apache Hudi
>          Issue Type: Bug
>            Reporter: Raymond Xu
>            Assignee: Yann Byron
>            Priority: Major
>             Fix For: 0.11.0
>
>
> {code:sql}
> create table if not exists cow_nonpt_nonpcf_tbl (
>   id int,
>   name string,
>   price double
> ) using hudi
> options (
>   type = 'cow',
>   primaryKey = 'id'
> );
> insert into cow_nonpt_nonpcf_tbl select 1, 'a1', 20;
> ALTER TABLE cow_nonpt_nonpcf_tbl alter column id comment "primary id";
> DESC cow_nonpt_nonpcf_tbl;
> -- this works fine so far
> ALTER TABLE cow_nonpt_nonpcf_tbl alter column name comment "name column";
> DESC cow_nonpt_nonpcf_tbl;
> -- this saves the comment for name column
> -- but comment for id column was reverted back to NULL
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to