feat: split libiceberg into iceberg-core and iceberg-data#628
Closed
zhjwpku wants to merge 1 commit intoapache:mainfrom
Closed
feat: split libiceberg into iceberg-core and iceberg-data#628zhjwpku wants to merge 1 commit intoapache:mainfrom
zhjwpku wants to merge 1 commit intoapache:mainfrom
Conversation
c4f0097 to
4f31660
Compare
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`.
af1c2f1 to
6b85b4f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the monolithic
iceberglibrary with two targets:iceberg-core— schema/types/partition/sort/transform, table/snapshot/ metadata/transactions/updates, manifest handling, expressions, catalog (including in-memory), utilities, file I/O abstractions, anddelete_file_index(kept in core becausemanifest_groupholdsDeleteFileIndex::Builderby value and only depends on core types).iceberg-data—data/,deletes/,puffin/; publicly linksiceberg-core.iceberg_bundlelinksiceberg-data;iceberg_restlinksiceberg-coreonly. There is no umbrellaicebergcompatibility target.CMake: optional
EXPORT_NAMEonadd_iceberg_lib; hyphenated target names map toICEBERG_*_EXPORTINGvia underscore substitution for MSVC. Per-packageiceberg_install_cmake_packageinstallsiceberg-core-config.cmake,iceberg-data-config.cmake, and matching*-targets.cmakeunderlib/cmake/<package>/; install namespace remainsiceberg::(e.g.iceberg::iceberg-core_static). Vendored third-party installs are routed to the export set that owns them (core vs bundle vs rest). Systemfind_dependencylists are split per package soiceberg-coreconsumers do not pull Arrow/Parquet/Avro/cpr.Symbol visibility:
iceberg_export.hdefinesICEBERG_CORE_EXPORT/ICEBERG_EXPORT(core-only toggles);iceberg_data_export.hdefinesICEBERG_DATA_EXPORTfor data-layer public APIs. Cross-boundary symbols used from data (WriterProperties,ArrowArrayGuard,ArrowSchemaGuard) are exported from core.