prateek11rai opened a new issue, #4628:
URL: https://github.com/apache/iceberg-python/issues/4628

   > [!NOTE]
   > 🤖 `claude-opus-5-5` on behalf of Prateek
   
   ### Feature Request / Improvement
   
   Setting a table or namespace description with the `comment` property works 
in PyIceberg's Hive catalog but is quietly ignored by the Glue catalog. There 
are three gaps:
   
   **1. Alignment.** Hive uses `comment` as the description for namespaces 
([`hive.py#L255`](https://github.com/apache/iceberg-python/blob/9abf5b1919f5767b8bd70a8fc9135183a7026257/pyiceberg/catalog/hive.py#L255))
 and tables (table properties become HMS parameters, so `comment` is the Hive 
table comment). Glue uses `Description` instead 
([tables](https://github.com/apache/iceberg-python/blob/9abf5b1919f5767b8bd70a8fc9135183a7026257/pyiceberg/catalog/glue.py#L285-L286),
 
[namespaces](https://github.com/apache/iceberg-python/blob/9abf5b1919f5767b8bd70a8fc9135183a7026257/pyiceberg/catalog/glue.py#L320-L321))
 and stores a `comment` as a plain Glue parameter. Other implementations use 
`comment` in Glue: iceberg-go made this exact change in 
[`aa27f3f`](https://github.com/apache/iceberg-go/commit/aa27f3fe9149d1e1bdff15cebd7c9242475507aa)
 ("use canonical comment property for descriptions", 2026-07-24), keeping 
`Description` as a legacy key, and Java's Glue catalog uses `comment` at both 
levels
  
([`GLUE_DESCRIPTION_KEY`](https://github.com/apache/iceberg/blob/8161bf778f2d8df727d3f196314e99db29f22cb6/aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java#L65-L66)).
 `comment` is also Java's 
[`TableProperties.COMMENT`](https://github.com/apache/iceberg/blob/8161bf778f2d8df727d3f196314e99db29f22cb6/core/src/main/java/org/apache/iceberg/TableProperties.java#L86-L87).
 The table spec itself defines no description, so this is a convention rather 
than a spec rule.
   
   **2. Tests.** 
[`test_create_namespace_with_comment_and_location`](https://github.com/apache/iceberg-python/blob/9abf5b1919f5767b8bd70a8fc9135183a7026257/tests/catalog/test_glue.py#L569-L582)
 creates a namespace with `"comment": "this is a test description"`, but only 
checks that `comment` round-trips through load. The value lands in the Glue 
parameters and the Glue description stays empty, so the test passes without 
covering it. No Glue test checks a description set with `comment`.
   
   **3. Docs.** Neither `comment` nor `Description` is documented, so users 
have no way to know which key sets a description in which catalog.
   
   **Current behaviour** (moto, `main`):
   
   | Set on create | Glue table description | Glue database description |
   |---|---|---|
   | `comment: C` | not set | not set (`C` stored as a parameter) |
   | `Description: D` | `D` | `D` |
   | both | `D` | `D` |
   
   **Proposal:**
   - In the Glue catalog, use `comment` as the description for tables and 
namespaces, and keep `Description` working as a legacy key. When both are set, 
`comment` wins, as in iceberg-go. Deprecating `Description` would be a separate 
decision for the team.
   - Make the Glue tests assert the Glue description itself.
   - Document `comment` as the way to set a table or namespace description.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to