monologuist opened a new issue, #13126: URL: https://github.com/apache/iceberg/issues/13126
### Proposed Change # Current Issues ## 1. Separate Handling of Tables and Views: Iceberg's HiveCatalog supports querying Hive views, but tables and views are not unified internally. Hive itself treats tables and views uniformly, but Iceberg differentiates them through separate interfaces (`Catalog` for tables, `ViewCatalog` for views). This leads to redundant code and inconsistent APIs (e.g., `loadTable()` in `Catalog` vs. `loadView()` in `ViewCatalog`). ## 2. Inconsistent Catalog Interface Hierarchy: The `ViewCatalog` interface does not extend `Catalog`, despite many overlapping methods (e.g., both have methods to load/delete objects with similar parameters). Subclasses like `HiveCatalog` inherit from `BaseMetastoreViewCatalog`, creating a disjoint hierarchy from the core `Catalog` interface. ## 3. Lack of Unified Abstraction: Tables and views are implemented as separate classes with no common base interface. This makes it difficult to unify logic for metadata operations (e.g., creation, modification, permissions). # Motivation for Unification **Simpler API Design:** Eliminate duplicate methods (e.g., merge loadTable() and loadView() into a single load() method). **Easier Integration:** Third-party components (e.g., Spark, Flink) would need to handle only one unified interface for tables and views. **Alignment with Hive Ecosystem:** Match Hive’s design philosophy of treating tables and views uniformly, reducing adaptation costs for Hive users. **Scalability:** Facilitate future features like materialized views or view versioning by establishing a common abstraction layer. # Community Value **Simpler Ecosystem Integration:** Reduces effort for components to support views. **Cleaner Codebase:** Eliminates redundant logic between Catalog and ViewCatalog. **Improved Maintainability:** Makes it easier to extend metadata features for both tables and views. Overall, by unifying the Catalog and ViewCatalog interfaces, as well as the Table/View abstraction, Iceberg can significantly improve architectural consistency and user experience, while better collaborating with the external ecosystem, such as making it easier to implement advanced features of views. I propose discussing this in the next community sync or creating a Jira ticket to track the effort. Happy to elaborate or iterate on the design! This version balances technical detail with clarity, suitable for an official issue report. Let me know if you need adjustments! ### Proposal document _No response_ ### Specifications - [x] Table - [x] View - [ ] REST - [ ] Puffin - [ ] Encryption - [ ] Other -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org