Hi Folks, As a part of persistence refactor effort, I proposed to separate entities in Polaris. Currently, PolarisBaseEntity serves as a parent class for 8 sub-entities(e.g., catalog, namespace, table, principal, etc). While this design has been effective so far, it introduces several challenges as the Polaris data model evolves:
1. *Adding New Entities:* Entities such as policyEntity and genericTableEntity may not naturally align with PolarisBaseEntity, complicating their integration. 2. *Modifying Existing Entities:* Introducing new fields to a specific entity (e.g., table) currently necessitates modifying the shared data model for all 8 sub-entities, increasing the risk of changes. 3. *Implementing New Access Patterns: *Creating secondary indexes or new index tables/slices currently impacts all 8 sub-entities due to their shared structure. 4. *Separation of Concerns and Modularity: *The current structure makes it difficult to separate concerns effectively, limiting modularity and making future maintenance and enhancements more challenging. Here is the detail design doc: https://docs.google.com/document/d/1Jxir9JHZ9g0QNNieRj3y9bHOgNmNuXOvJujI0bZ11mQ/edit?usp=sharing I also did a *POC* here https://github.com/apache/polaris/pull/1128, which is based on a WIP PR 1112. I believe it can help to archive the separation without a huge refactor. Yufei