refactor(core): make SchemaManager an interface - #9174
Open
baiyangtx wants to merge 4 commits into
Open
Conversation
added 4 commits
August 11, 2026 20:16
Move the existing file-system implementation to FileSystemSchemaManager and update construction sites to use it. Keep consumers typed against SchemaManager and preserve its static utility API.
…a/codex-schema-manager-interface # Conflicts: # paimon-core/src/main/java/org/apache/paimon/privilege/FileBasedPrivilegeManager.java
Contributor
Author
|
@Aitozi @JingsongLi PTAL |
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.
Purpose
SchemaManageris currently a concrete file-system-backed class. This couples callers to a specific implementation and makes it difficult for catalogs and table implementations to provide specialized schema-management behavior while keeping the rest of the codebase independent of the storage mechanism.This PR turns
SchemaManagerinto an interface and moves the existing implementation toFileSystemSchemaManager.The change:
SchemaManager;FileSystemSchemaManager;FileSystemSchemaManagerwhile keeping consumers typed againstSchemaManager;SchemaManagerstatic utility entry points by delegating them to the default implementation; andThis separation allows alternative or decorated schema-manager implementations to be introduced without requiring downstream table components to depend on the file-system implementation. No schema format or runtime behavior is changed by this refactoring.
Tests
SchemaManagerTestcoverage continues to exercise schema creation, evolution, commit, rollback, and utility behavior through the interface and default implementation.