Skip to content

[Discussion] Creating an iceberg-catalog-api crate. #1467

Closed
@liurenjie1024

Description

@liurenjie1024

Problem Statem

During development I found that some times in the core iceberg crate, we need some external dependencies such as MemoryCatalog, which is useful in following cases:

  1. In doc example: docs: add Transaction example #1436
  2. In unit tests, such as transaction api

So I want to create an iceberg-catalog-api crate to move Catalog and CatalogLoader trait into this module, so that we have following dependency graph:

                iceberg-catalog-api
                              |
                iceberg-catalog-memory
                              |(dev dependency)
                         iceberg

Alternative 1: Moving iceberg-catalog-memory to iceberg crate

While this solves the problem we are currently facing, this have several disadvantages like following:

  1. It makes iceberg crate larger.
  2. It's not scalable. For example when we finished refactoring of FileIO, we may still facing similar issue, and we hope to adopt the proposed approach.

Alternative 2: Creating an iceberg-api crate to contain all trait definition.

This is similar to current proposal, and similar to the java approach. The only problem is that it violated smaller crate principal, but I'm not 100% sure that this is worse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions