Skip to content

feat: add iceberg_data library alongside iceberg#631

Open
zhjwpku wants to merge 1 commit intoapache:mainfrom
zhjwpku:split-iceberg-core-data
Open

feat: add iceberg_data library alongside iceberg#631
zhjwpku wants to merge 1 commit intoapache:mainfrom
zhjwpku:split-iceberg-core-data

Conversation

@zhjwpku
Copy link
Copy Markdown
Collaborator

@zhjwpku zhjwpku commented Apr 27, 2026

Move data writers, deletes/, and puffin/ into a separate iceberg_data library that links the existing iceberg target. delete_file_index stays in iceberg because manifest_group embeds DeleteFileIndex::Builder with only core dependencies.

  • iceberg — unchanged target name for metadata/planning, expressions, manifests, catalog (incl. in-memory), utilities, file I/O abstractions, and delete_file_index.

  • iceberg_data — data/, deletes/, puffin/; links iceberg.

iceberg_bundle links iceberg_data when the bundle is built. iceberg_rest links iceberg and cpr only.

CMake: per-package iceberg_install_cmake_package installs iceberg-config.cmake, iceberg_data-config.cmake, optional iceberg_bundle-config.cmake, and matching *-targets.cmake under lib/cmake/<package>/; install namespace remains iceberg::. Split find_dependency lists so iceberg consumers do not pull Arrow/Parquet/Avro/cpr. Vendored third-party exports are attached to the package that owns them (core vs bundle vs rest). Add iceberg_rest-config.cmake.in for the REST catalog package.

Meson and tests link the split targets; the example uses find_package(iceberg_bundle) and iceberg::iceberg_bundle_static.

Symbol visibility: iceberg_export.h documents ICEBERG_EXPORT for the main iceberg DLL; iceberg_data_export.h adds ICEBERG_DATA_EXPORT for data-layer public APIs. Shared builds define ${UPPER_LIB_NAME}_EXPORTING (e.g. ICEBERG_DATA_EXPORTING) for MSVC. Types used across the boundary (e.g. WriterProperties, Arrow guards) remain exported from iceberg.

Move data writers, deletes/, and puffin/ into a separate `iceberg_data`
library that links the existing `iceberg` target. `delete_file_index`
stays in `iceberg` because manifest_group embeds DeleteFileIndex::Builder
with only core dependencies.

* `iceberg` — unchanged target name for metadata/planning, expressions,
  manifests, catalog (incl. in-memory), utilities, file I/O abstractions,
  and delete_file_index.

* `iceberg_data` — data/, deletes/, puffin/; links `iceberg`.

`iceberg_bundle` links `iceberg_data` when the bundle is built.
`iceberg_rest` links `iceberg` and cpr only.

CMake: per-package `iceberg_install_cmake_package` installs
`iceberg-config.cmake`, `iceberg_data-config.cmake`, optional
`iceberg_bundle-config.cmake`, and matching `*-targets.cmake` under
`lib/cmake/<package>/`; install namespace remains `iceberg::`.
Split `find_dependency` lists so `iceberg` consumers do not pull
Arrow/Parquet/Avro/cpr. Vendored third-party exports are attached to the
package that owns them (core vs bundle vs rest). Add
`iceberg_rest-config.cmake.in` for the REST catalog package.

Meson and tests link the split targets; the example uses
`find_package(iceberg_bundle)` and `iceberg::iceberg_bundle_static`.

Symbol visibility: `iceberg_export.h` documents `ICEBERG_EXPORT` for the
main `iceberg` DLL; `iceberg_data_export.h` adds `ICEBERG_DATA_EXPORT` for
data-layer public APIs. Shared builds define `${UPPER_LIB_NAME}_EXPORTING`
(e.g. ICEBERG_DATA_EXPORTING) for MSVC. Types used across the boundary
(e.g. WriterProperties, Arrow guards) remain exported from `iceberg`.
Copy link
Copy Markdown
Contributor

@MisterRaindrop MisterRaindrop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -45,7 +45,7 @@ namespace iceberg {
/// \note This class is used to represent deletion vectors. The Puffin puffin
/// reader/write handle adding the additional required framing (length prefix, magic,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reader/write reader/writer ?

@@ -45,7 +45,7 @@ namespace iceberg {
/// \note This class is used to represent deletion vectors. The Puffin puffin
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puffin puffin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants