Scan planning needs iceberg_bundle (and Arrow C++) only for the Avro reader
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 12/100
- Type d'issue
- Refactorisation
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- cpp
- Domaine
- build-system, data
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- C++
- Étoiles
- 228
- Forks
- 136
- Merge moyen
- 5 j 19 h
- PR mergées (30 j)
- 53
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/iceberg-cpp
-
bug: TableMetadataBuilder::RemoveSchemas leaves removed ids in the schema indexPeut-être pris @LuciferYang l’a pris il y a 5 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
apache/iceberg-cpp#1011 ·
Les mainteneurs répondent en général sous 2 jours
-
bug: gzip table metadata is neither written nor detected as gzipPeut-être pris @LuciferYang l’a pris il y a 5 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 66/100
apache/iceberg-cpp#1013 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
apache/iceberg-cpp#1000 · 2 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 8/100
apache/iceberg-cpp#988 · 2 commentaires ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 20/100
apache/iceberg-cpp#959 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de apache/iceberg-cpp
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
[BUG] Clipboard History: Buffer over-read in WideCharToMultiByte on double-click pastePeut-être pris @softmgr l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
notepad-plus-plus/notepad-plus-plus#18519 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
justcallmekoko/ESP32Marauder#1635 ·
Les mainteneurs répondent en général sous 1 jour
-
3.7.6-dev commit 80481ea - files not centered when resolution differs and zoom = "pixel-to-pixel"Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
grizzlypeak3d/DJV#931 ·