[core] Add option for catalog options system table#8303
Conversation
leaves12138
left a comment
There was a problem hiding this comment.
Thanks for adding the opt-in guard for sys.catalog_options. The default-hidden behavior and the direct getTable(sys.catalog_options) check look good.
I found one issue in the new REST system-database paged paths: they now bypass the REST server, but the local fallback returns all system tables and ignores tableNamePattern, tableType, maxResults, and pageToken. Since RESTCatalog advertises supportsListObjectsPaged(), supportsListByPattern(), and supportsListTableByType(), callers of listTablesPaged("sys", ...) / listTableDetailsPaged("sys", ...) will get results that don't match the API contract. Please apply the same filtering/pagination semantics to the system-table list (or reject unsupported filters consistently), and add REST coverage for this sys branch.
Validation I ran locally:
mvn -pl paimon-core -am -DskipITs -Dcheckstyle.skip -Drat.skip -DfailIfNoTests=false -Dtest=CatalogOptionsTableTest testpassed.- A broader
CatalogOptionsTableTest,FileSystemCatalogTestrun hit an unrelated localFileSystemCatalogTest.testReplaceTablecodegen/plugin-loader NPE in this environment, whileCatalogOptionsTableTestitself passes.
Summary
Add a catalog option to control whether the
sys.catalog_optionssystem table is available. The table is disabled by default and can be enabled explicitly withcatalog-options-table.enabled=true.Changes
catalog-options-table.enabledto catalog options.sys.catalog_optionsfrom global system table listings unless the option is enabled.sys.catalog_optionswith the same option.Testing
mvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -Dtest=CatalogOptionsTableTest testmvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -Dtest=FileSystemCatalogTest#testGetTable testmvn -pl paimon-spark/paimon-spark-ut -am -Pfast-build -DfailIfNoTests=false -DwildcardSuites=org.apache.paimon.spark.table.PaimonSystemTableTest -Dtest=none testmvn -pl paimon-flink/paimon-flink-common -am -Pfast-build -DfailIfNoTests=false -Dtest=CatalogTableITCase#testCatalogOptionsTable,CatalogTableITCase#testSystemDatabase test