You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/04/22 20:52:29 UTC

[GitHub] [iceberg] cccs-jc opened a new issue, #4615: Add support to alter table comment

cccs-jc opened a new issue, #4615:
URL: https://github.com/apache/iceberg/issues/4615

   I looking for a way to change the table comment. You can create a table with a comment
   
   ```sql
   CREATE TABLE prod.db.sample (
       id bigint COMMENT 'unique id',
       data string)
   USING iceberg
   ```
   
   You can alter the comment of a column
   
   ```sql
   ALTER TABLE prod.db.sample ALTER COLUMN measurement COMMENT 'unit is kilobytes per second'
   ```
   
   But there does not appear to be a way to alter the tables comment. 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] felixYyu commented on issue #4615: Add support to alter table comment

Posted by GitBox <gi...@apache.org>.
felixYyu commented on issue #4615:
URL: https://github.com/apache/iceberg/issues/4615#issuecomment-1110671661

   > ALTER TABLE hadoop_prod.default.test_evolution7 SET TBLPROPERTIES ('comment' = 'A table comment.')
   
   > ALTER TABLE hadoop_prod.default.test_evolution7 ALTER COLUMN point COMMENT "new comment"
   
   the syntax of Spark sql can work @kbendick . show DDL detail following:
   ```
   +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |createtab_stmt                                                                                                                                                                                                                                                                                                                                                                                                                        |
   +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   |CREATE TABLE hadoop_prod.default.test_evolution7 (\n  `col0` BIGINT,\n  `col10` BIGINT,\n  `point` STRUCT<`x`: DOUBLE, `y`: DOUBLE> COMMENT 'new comment')\nUSING iceberg\nCOMMENT 'A table comment.'\nLOCATION 'file:///D:/lake-iceberg/warehouse/default/test_evolution7'\nTBLPROPERTIES(\n  'current-snapshot-id' = 'none',\n  'format' = 'iceberg/parquet',\n  'format-version' = '1',\n  'write.delete.mode' = 'merge-on-read')\n|
   +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] kbendick commented on issue #4615: Add support to alter table comment

Posted by GitBox <gi...@apache.org>.
kbendick commented on issue #4615:
URL: https://github.com/apache/iceberg/issues/4615#issuecomment-1110541942

   According to the vanilla spark docs, this syntax should also work `ALTER TABLE StudentInfo ALTER COLUMN name COMMENT "new comment";`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] kbendick commented on issue #4615: Add support to alter table comment

Posted by GitBox <gi...@apache.org>.
kbendick commented on issue #4615:
URL: https://github.com/apache/iceberg/issues/4615#issuecomment-1110547774

   If it does work, please feel free to open up a small PR to add this to the Spark docs section (or @felixYyu if @cccs-jc says they donโ€™t have time)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] felixYyu commented on issue #4615: Add support to alter table comment

Posted by GitBox <gi...@apache.org>.
felixYyu commented on issue #4615:
URL: https://github.com/apache/iceberg/issues/4615#issuecomment-1107677506

   you can use `COMMENT ON TABLE my_table IS 'This is my table';`
   
   [](https://docs.databricks.com/sql/language-manual/sql-ref-syntax-ddl-comment.html)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] felixYyu commented on issue #4615: Add support to alter table comment

Posted by GitBox <gi...@apache.org>.
felixYyu commented on issue #4615:
URL: https://github.com/apache/iceberg/issues/4615#issuecomment-1110680201

   I will open a PR to add this to the Spark docs.  @kbendick 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] kbendick commented on issue #4615: Add support to alter table comment

Posted by GitBox <gi...@apache.org>.
kbendick commented on issue #4615:
URL: https://github.com/apache/iceberg/issues/4615#issuecomment-1110542925

   For table comment, this should work:
   
   ```sql
   โ€” SET TABLE COMMENT Using SET PROPERTIES
   ALTER TABLE dbx.tab1 SET TBLPROPERTIES ('comment' = 'A table comment.')
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] kbendick commented on issue #4615: Add support to alter table comment

Posted by GitBox <gi...@apache.org>.
kbendick commented on issue #4615:
URL: https://github.com/apache/iceberg/issues/4615#issuecomment-1110543572

   Both of these examples came from here: https://spark.apache.org/docs/latest/sql-ref-syntax-ddl-alter-table.html
   
   Please let us know if that does not work with Iceberg. If it does, feel free to close this issue ๐Ÿ™‚ 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] szehon-ho closed issue #4615: Add support to alter table comment

Posted by GitBox <gi...@apache.org>.
szehon-ho closed issue #4615: Add support to alter table comment
URL: https://github.com/apache/iceberg/issues/4615


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org