bug: gzip table metadata is neither written nor detected as gzip
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 66/100
Línea de trabajo
Start in src/iceberg/table_metadata.cc, at Codec::FromFileName, where find_last_of(kTableMetadataFileSuffix) searches for any single character rather than the suffix, and at TableMetadataUtil::Write, which never compresses. The existing GZipDecompressor in util/gzip_internal.h is the model for a matching GZipCompressor. Done means a gzip-configured table writes gzip metadata that is read back correctly, and a name without .metadata.json is rejected. Both halves need to land together.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
With write.metadata.compression-codec=gzip, iceberg-cpp names new metadata files <version>-<uuid>.gz.metadata.json, the same layout Iceberg Java uses, but the round trip is broken on both sides:
TableMetadataUtil::Writenever compresses. It writes plain JSON into the.gz.metadata.jsonfile, so Java (or any reader that trusts the name) fails to inflate it.Codec::FromFileNamemisdetects the codec. It callsfind_last_of(".metadata.json"), which searches for any single character of that set, not the suffix. For00001-abc.gz.metadata.jsonit lands on the finaln, the.gzcheck fails, and the file is read as uncompressed. A gzip file written by Java under that name therefore fails to parse.
The two bugs mask each other inside iceberg-cpp: a file it writes is plain JSON and is read back as plain JSON, so its own round trip happens to work.
Root cause
src/iceberg/table_metadata.cc:
auto pos = file_name.find_last_of(kTableMetadataFileSuffix); // character-set search
and TableMetadataUtil::Write(io, location, metadata) serializes and calls io.WriteFile with no codec step. Only a GZipDecompressor exists in util/gzip_internal.h.
Java's TableMetadataParser.Codec.fromFileName uses lastIndexOf(".metadata.json"), and internalWrite wraps the stream in GZIPOutputStream when that codec is gzip.
Impact
A table configured with gzip metadata compression is not readable across engines in either direction: Java cannot read what iceberg-cpp writes, and iceberg-cpp cannot read what Java writes. The default codec is none, so tables without that property are unaffected.
The find_last_of bug also means FromFileName accepts names with no .metadata.json at all (e.g. foo.txt is classified as uncompressed), while Java rejects them.
Proposed fix
Use rfind in FromFileName, and compress in Write when the location's codec is gzip, with a small GZipCompressor next to the existing GZipDecompressor. Both halves have to land together: fixing only the read side makes iceberg-cpp try to inflate the plain JSON it writes today.
- Lenguaje dominante
- C++
- Estrellas
- 226
- Forks
- 133
- Merge medio
- 6 d 2 h
- PR fusionados (30 d)
- 49
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/iceberg-cpp
-
bug: TableMetadataBuilder::RemoveSchemas leaves removed ids in the schema indexPosiblemente ocupada @LuciferYang la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/iceberg-cpp#1011 ·
Los mantenedores suelen responder en 2 días
-
Big-endian compatibility failures in bucket hashing and Avro/deletion-vector serializationPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
apache/iceberg-cpp#1000 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
Support Iceberg table encryption (Java-compatible)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
apache/iceberg-cpp#988 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
apache/iceberg-cpp#959 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
apache/iceberg-cpp#946 · 6 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de apache/iceberg-cpp
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
NVIDIA-RTX/NRI#277 ·
Los mantenedores suelen responder en 1 día
-
os:Linux
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
-
acceptable_buffer_backends: unknown backend names are silently ignoredPosiblemente ocupada @mini-1235 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
ros2/rmw_fastrtps#945 ·
Los mantenedores suelen responder en 1 día