Skip to content

[core] Add option for catalog options system table#8303

Open
JingsongLi wants to merge 2 commits into
apache:masterfrom
JingsongLi:codex/catalog-options-table-toggle
Open

[core] Add option for catalog options system table#8303
JingsongLi wants to merge 2 commits into
apache:masterfrom
JingsongLi:codex/catalog-options-table-toggle

Conversation

@JingsongLi

Copy link
Copy Markdown
Contributor

Summary

Add a catalog option to control whether the sys.catalog_options system table is available. The table is disabled by default and can be enabled explicitly with catalog-options-table.enabled=true.

Changes

  • Added catalog-options-table.enabled to catalog options.
  • Filtered sys.catalog_options from global system table listings unless the option is enabled.
  • Guarded direct loading of sys.catalog_options with the same option.
  • Updated docs and generated catalog configuration reference.
  • Adjusted core, Flink, and Spark tests for the new default behavior.

Testing

  • mvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -Dtest=CatalogOptionsTableTest test
  • mvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -Dtest=FileSystemCatalogTest#testGetTable test
  • mvn -pl paimon-spark/paimon-spark-ut -am -Pfast-build -DfailIfNoTests=false -DwildcardSuites=org.apache.paimon.spark.table.PaimonSystemTableTest -Dtest=none test
  • mvn -pl paimon-flink/paimon-flink-common -am -Pfast-build -DfailIfNoTests=false -Dtest=CatalogTableITCase#testCatalogOptionsTable,CatalogTableITCase#testSystemDatabase test

@leaves12138 leaves12138 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 test passed.
  • A broader CatalogOptionsTableTest,FileSystemCatalogTest run hit an unrelated local FileSystemCatalogTest.testReplaceTable codegen/plugin-loader NPE in this environment, while CatalogOptionsTableTest itself passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants