diqiu50 opened a new issue, #14048:
URL: https://github.com/apache/gravitino/issues/14048

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   Updating a column comment with a null value (`"newComment": null`) is 
accepted by the REST API and Java/Python clients. MySQL clears the comment, but 
other JDBC dialects do not:
   - PostgreSQL generates `COMMENT ON COLUMN ... IS 'null'`
   - Doris generates `MODIFY COLUMN ... COMMENT 'null'`
   - Hologres throws NullPointerException (HTTP 500)
   
   Updating a table comment with null has the same problem: it writes "null" on 
MySQL, PostgreSQL, Doris, StarRocks and OceanBase, and throws 
NullPointerException on Hologres and ClickHouse.
   
   ### Error message and/or stacktrace
   
   PostgreSQL / Doris: the column comment becomes the literal text "null".
   Hologres: NullPointerException in HologresTableOperations.
   
   ### How to reproduce
   
   1. Create a PostgreSQL catalog and a table with a commented column.
   2. Alter the table with `TableChange.updateColumnComment(new String[] 
{"col"}, null)`.
   3. Load the table; the column comment is "null".
   
   ### Additional context
   
   A null comment should clear the comment on every dialect, as MySQL does for 
column comments.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to