Scan planning needs iceberg_bundle (and Arrow C++) only for the Avro reader
維護者通常 2 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 12/100
- Issue 類型
- 重構
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- cpp
- 領域
- build-system, data
研究方向
This is a design proposal, so start by settling with maintainers whether the split is wanted. Read the Arrow C++ uses under src/iceberg/avro/ (the reader builders, the writer's array and decimal handling, and avro_schema_util.cc's arrow::DecimalType::DecimalSize call) and the helpers in the bundle's iceberg/arrow/ directory. Compare them with how ManifestReader and ManifestEntryAdapter already use nanoarrow. Done would mean an agreed plan for an Arrow-free iceberg_avro target, not a patch.
由索引模型根據 Issue 內容生成。
描述
We are building an Iceberg connector for Axiom, which runs on Velox. We plan to use iceberg-cpp for the REST catalog and for scan planning, and Velox reads the data files.
To plan a scan, ManifestReader reads the manifest list and the manifests, which are Avro files. It gets the reader from ReaderFactoryRegistry for FileFormatType::kAvro, and the only Avro reader is the one iceberg::avro::RegisterAll() registers from iceberg_bundle. The bundle also links Arrow C++ and Parquet. The other libraries we use, iceberg, iceberg_rest and iceberg_data, have no Arrow C++ in them, they contain no arrow:: symbols. Without the bundle, though, every scan fails with Missing reader factory for file format: avro. So we have to link Arrow C++ just to read manifests.
For us that means two Arrow versions in one process. Velox pins Arrow 18.0.0 and iceberg-cpp builds Arrow 25.0.0. They define the same symbols with different class layouts, and code compiled against one version ends up calling the other. We hit this with arrow::DictionaryArray, which is 72 bytes in Arrow 18 and 80 bytes in Arrow 25 (Arrow 25 added a std::once_flag member). Velox's Parquet writer is compiled against Arrow 18 and allocates 72 bytes for one, but the constructor that runs is Arrow 25's, and it writes the new member 8 bytes past the end of the object. The process then crashes later, in some unrelated malloc.
Right now we work around this by building iceberg-cpp and its Arrow into a separate shared library, with per-platform linker flags that hide every Arrow symbol and a build-time check that none leak out. It works, but it's fragile, and the Avro reader is the only reason we need it.
The Avro code doesn’t need Arrow C++ at its interface, and the public Avro headers don’t include it. The reader returns ArrowArray and ArrowSchema C structs, the writer takes an ArrowArray, and both open files through FileIO. The core already builds and parses Arrow data with nanoarrow, for example in ManifestEntryAdapter and ManifestReader.
Inside src/iceberg/avro/, Arrow C++ is only an implementation detail, and each use of it can be replaced with something Arrow-free. The reader builds its output with Arrow C++ builders and the writer reads its input as Arrow C++ arrays, decimals and default values included; nanoarrow, which the core already uses, can do both. Files are read and written through Arrow IO streams, which FileIO’s own streams can replace. A couple of small helpers come from the bundle’s iceberg/arrow/ directory and could move to the core. The field-id projection (Project and MakeAvroNodeWithFieldIds) doesn’t use Arrow C++ at all, and the only Arrow call in avro_schema_util.cc is arrow::DecimalType::DecimalSize, a byte-width calculation that is easy to do without Arrow.
Would you be open to rewriting the Avro reader and writer on nanoarrow and moving them into their own library, say iceberg_avro, that depends only on the core and avro-cpp? iceberg_bundle would link it, so nothing changes for people who use the bundle. Engines like us could then link iceberg, iceberg_rest, iceberg_data and iceberg_avro, with only one Arrow in the process.
Thank you.
- 主要語言
- C++
- 星號
- 228
- 分支
- 136
- 平均合併
- 5 天 22 小時
- 30 天內合併 PR
- 52
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apache/iceberg-cpp 的其他 Issue
-
bug: TableMetadataBuilder::RemoveSchemas leaves removed ids in the schema index可能已有人在做 @LuciferYang 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
apache/iceberg-cpp#1011 ·
維護者通常 2 天內回覆
-
build: regression after #1021 — Arrow's arrow_SOURCE_DIR collides with FetchContent on CMake 3.28, breaks vendored Arrow build可能已有人在做 @raulcd 今天認領。 未關閉
難度 3/5 半天 新手友好度 22/100
apache/iceberg-cpp#1028 · 1 則留言 ·
維護者通常 2 天內回覆
-
bug: gzip table metadata is neither written nor detected as gzip可能已有人在做 @LuciferYang 於 3 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 66/100
apache/iceberg-cpp#1013 ·
維護者通常 2 天內回覆
-
難度 4/5 3-5 天 新手友好度 35/100
apache/iceberg-cpp#1000 · 2 則留言 · 1 個 reaction ·
維護者通常 2 天內回覆
-
難度 5/5 一週以上 新手友好度 8/100
apache/iceberg-cpp#988 · 2 則留言 ·
維護者通常 2 天內回覆
查看 apache/iceberg-cpp 的全部 Issue
相似的 Issue
-
Mac mini M6 (16 GB): Q2_0 streaming works - measured 11.7->27.2 tok/s + arena fix for sub-32 GB Macs未關閉
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
champion good first issue remake source/qq
難度 2/5 1-3 小時 新手友好度 65/100
metasequoiaime/msime-windows#1025 ·
維護者通常 1 天內回覆
-
backlog bug
難度 2/5 1-3 小時 新手友好度 75/100
EchoTools/nevr-runtime#653 ·
維護者通常 1 天內回覆
-
`--fail-require-skip` never fires: run_tests.py searches stdout, but the unittest binary writes the skip summary to stderr可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
InfiniTimeOrg/InfiniTime#2492 ·