Hi, I agree. I see the same adding view support on the JDBC Catalog (https://github.com/apache/iceberg/pull/9487). It would be a good improvement. As discussed in the Hive PR, I think we can move forward with Iceberg 1.5.0 release including view support, and do this improvement for 1.6.0.
I think we can introduce BaseOperations extended by both BaseViewOperations and BaseMetastoreTableOperations, where we can have generic behaviors common to both view and table. I'm volunteering to do that for Iceberg 1.6.0 :) Regards JB On Fri, Jan 19, 2024 at 10:31 AM Péter Váry <peter.vary.apa...@gmail.com> wrote: > > During the implementation of views in HiveCatalog, we have found that we are > duplicating huge amounts of code for view management (creation, deletion, > commits). Often we have to use the same method names, but the interfaces are > unrelated to the moment. > > This similarity highlights that the interfaces define the same behaviour, and > it would be good to formalize it by adding a common ancestor for them. > > Thanks, > Peter > > Naveen Kumar <nk1...@gmail.com> ezt írta (időpont: 2024. jan. 17., Sze, > 12:16): >> >> Hi Iceberg Community, >> >> Currently there is no relation between TableMetadata and ViewMetadata. Which >> causes many duplicate codes just to use commonTable/View definitions like >> Schema/MetadataLocation/Properties. >> >> At many places we have similar methods with overloaded parameters like >> TableMetadata and ViewMetadata. >> >> To support purge on view it is difficult to traverse to the historical >> metadata files. >> >> I would like to start a discussion on potential enhancement of ViewMetadata. >> >> An abstract class such as IcebergMetadata with common definition from >> TableMetadata and ViewMetadata. >> Add something similar of MetadataLogEntry for ViewMetadata too. >> >> Please share your thoughts. >> >> Ref: https://github.com/apache/iceberg/pull/8907#discussion_r1441986754 >> >> Regards, >> Naveen Kumar >>