feat: Add manifests and files system tables#309
Open
suxiaogang223 wants to merge 10 commits into
Open
Conversation
52f584d to
cf6e2f1
Compare
9ff3a86 to
ff9be72
Compare
lxy-9602
reviewed
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
This PR is part of #141 and continues the system table work after the previously merged
options,audit_log,binlog, and pure metadata system table support.The scope of this PR is manifest/file-backed table-level metadata system tables. It adds read-only support for
table$manifestsandtable$files, so users can inspect latest snapshot manifest and data file metadata through the existing system table query path.Architecture
Keep
manifestsandfileson the existingInMemorySystemTableexecution path.GenericRowvalues.Split system table implementations into Java-aligned per-table files.
OptionsSystemTable,SnapshotsSystemTable,SchemasSystemTable,TagsSystemTable,BranchesSystemTable,ConsumersSystemTable,ManifestsSystemTable, andFilesSystemTablenow live in separate source/header pairs.metadata_system_tables.{h,cpp}aggregation file is removed.Introduce
SystemTableUtilsfor shared system table helpers.Keep
SystemTableLoaderregistry behavior unchanged.System Tables Added
This PR follows the Apache Paimon table-scoped system table model, where table metadata is queried with names like
table$files. Reference semantics: https://paimon.apache.org/docs/master/concepts/system-tables/table$manifestsSnapshotManager,ManifestList, andManifestFileMeta.file_name,file_size,num_added_files,num_deleted_files,schema_id,min_partition_stats,max_partition_stats,min_row_id,max_row_id.table$filesFileEntry::MergeEntries.partition,bucket,file_path,file_format,schema_id,level,record_count,file_size_in_bytes,min_key,max_key,null_value_counts,min_value_stats,max_value_stats,min_sequence_number,max_sequence_number,creation_time,deleteRowCount,file_source,first_row_id,write_cols.file_pathuses external path when present, otherwise the table bucket path plus file name.Scope Notes
scan.snapshot-id, tag, and timestamp time-travel options are left for follow-up work.options,audit_log,binlog,snapshots,schemas,tags,branches, andconsumersbehavior is preserved.partitions,buckets,statistics,table_indexes, andaggregation_fieldsare planned for later PRs.Tests
pre-commit run --all-filescmake --build build-codex-metadata-pr3 --target paimon-core-test paimon-read-inte-test -j2./build-codex-metadata-pr3/debug/paimon-core-test --gtest_filter=FileSystemCatalogTest.TestMetadataSystemTableCatalog./build-codex-metadata-pr3/debug/paimon-read-inte-test --gtest_filter=SystemTableReadInteTest.TestReadMetadataSystemTables:SystemTableReadInteTest.TestReadFilesSystemTableForPartitionedTable:SystemTableReadInteTest.TestReadManifestAndFilesSystemTablesForEmptyTable