Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-11275 Unified Catalog APIs
  3. FLINK-12841

Unify catalog meta-objects implementations

    XMLWordPrintableJSON

Details

    Description

      We've been evaluating the original design in FLIP-30 that proposed creating catalog meta object interfaces and individual impl of those interfaces in each catalog. Interfaces we have so far are: CatalogDatabase, CatalogTable, CatalogView, CatalogPartition, CatalogFunction, and e.g. for CatalogTable interface, we have impls of GenericCatalogTable and HiveCatalogTable, etc.

      Well, we have gone pretty far on FLIP-30 now. When we look back and re-evaluate this design, we actually found there are not many differences between, e.g. GenericCatalogTable and HiveCatalogTable. And having this class hierarchy complicates situations and development. E.g. this requires sql client to have a hard dependency on flink-connector-hive in order to create HiveCatalogTable from DDL, which I don't think is necessary.

      On the other side in Blink, we don't have this hierarchy and have been just using a single meta-object class (e.g. just CatalogTable) to represent data in different catalogs, it has been fine without any problem and all the difference among catalogs can be stored as properties.

      Thus we propose removing the inheritance hierarchy and impl of the meta-object interfaces for each individual catalog. To be more specific, take table classes for example, we will replace CatalogTable with existing AbstractCatalogTable, and remove GenericCatalogTable and HiveCatalogTable.

      Attachments

        Activity

          People

            phoenixjiangnan Bowen Li
            phoenixjiangnan Bowen Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: