Akeron-Zhu opened a new issue, #4357:
URL: https://github.com/apache/amoro/issues/4357

   ### Search before asking
   
   - [x] I have searched in the 
[issues](https://github.com/apache/amoro/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### What would you like to be improved?
   
   When configuring table-level properties on a catalog, the property key 
**must be prefixed with `table.`**. The prefix is automatically stripped when 
the property is applied to tables. However, this requirement is not documented 
anywhere in the user-facing documentation, which can easily lead to 
misconfiguration.
   
   For example, to set the default optimizer group for all tables under a 
catalog, users must configure `table.self-optimizing.group` instead of 
`self-optimizing.group`. Properties without the `table.` prefix will not be 
recognized as table-level defaults and will be silently ignored.
   
   This behavior is defined in code:
   
   - `CatalogMetaProperties.TABLE_PROPERTIES_PREFIX = "table."` 
(`CatalogMetaProperties.java:91`)
   - `CatalogUtil.mergeCatalogPropertiesToTable()` extracts only keys starting 
with `table.` and strips the prefix (`CatalogUtil.java:107-120`)
   
   ### How should we improve?
   
   Add a hint and examples to the `Configure table properties` section in 
`docs/admin-guides/managing-catalogs.md`:
   
   ```
   ### Configure table properties
   If you want to add the same table properties to all tables under a catalog, 
you can add these table properties here on the catalog level. If you also 
configure this property on the table level, the property on the table will take 
effect.
   
   {{< hint info >}}
   When configuring table-level properties on a catalog, you **must prefix the 
key with `table.`**. The prefix will be automatically stripped when the 
property is applied to tables. For example, to set the default 
`self-optimizing.group` for all tables under the catalog, you need to configure 
`table.self-optimizing.group` instead of `self-optimizing.group`. Properties 
without the `table.` prefix will not be recognized as table-level defaults and 
will be treated as catalog-level properties only.
   {{< /hint >}}
   
   The following table lists some examples:
   
   | Catalog property key                        | Effective table property key 
             | Description                                              |
   
|---------------------------------------------|-------------------------------------------|----------------------------------------------------------|
   | `table.self-optimizing.enabled`             | `self-optimizing.enabled`    
             | Enable/disable self-optimizing for all tables            |
   | `table.self-optimizing.group`               | `self-optimizing.group`      
             | Set the default optimizer group for all tables           |
   | `table.table-expire.enabled`                | `table-expire.enabled`       
             | Enable/disable table expiration for all tables           |
   | `table.clean-orphan-file.enabled`           | `clean-orphan-file.enabled`  
             | Enable/disable orphan file cleaning for all tables       |
   | `table.log-store.enabled`                   | `log-store.enabled`          
             | Enable/disable LogStore for all tables                   |
   
   For a complete list of available table properties, please refer to [Table 
Configurations](../configurations/).
   ```
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Subtasks
   
   _No response_
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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