[AMORO-4357][Docs] Document the table. prefix requirement for catalog-level table properties - #4358
Conversation
|
Hi @Akeron-Zhu , thanks for the doc fix — I verified the mechanism against CatalogUtil.mergeCatalogPropertiesToTable() and all the example keys check out. LGTM with one minor nit: The PR description mentions linking to the "Table configurations" page, but no such link was actually added in the diff. It would be helpful to add one so readers can find the full list of available table properties. One thing to note: the correct relative path from docs/admin-guides/managing-catalogs.md is ../user-guides/configurations.md — a link to ../configurations/ (as written in the description) would be broken, since there is no docs/configurations/ directory. |
Co-authored-by: CodeFree <codefree@chinatelcom.cn>
done. |
zhoujinsong
left a comment
There was a problem hiding this comment.
LGTM.
Thanks a lot for the work!
Why are the changes needed?
Close #4357.
When configuring table-level properties on a catalog, the property key must be
prefixed with
table.. The prefix is automatically stripped when the propertyis 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.groupinstead ofself-optimizing.group. Properties without thetable.prefix will not berecognized 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 withtable.and strips the prefix (CatalogUtil.java:107-120)Brief change log
docs/admin-guides/managing-catalogs.md:{{< hint info >}}block clarifying that keys must be prefixedwith
table.and that the prefix is automatically stripped.table property keys, including:
table.self-optimizing.enabled→self-optimizing.enabledtable.self-optimizing.group→self-optimizing.grouptable.table-expire.enabled→table-expire.enabledtable.clean-orphan-file.enabled→clean-orphan-file.enabledtable.log-store.enabled→log-store.enabledlist of available table properties.
How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before making a pull request
Documentation