ORC: read fails after dropping the only field of a struct column
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java, spark
- Área
- data-engineering
Línea de trabajo
The failure comes from the ORC read path: OrcValueReaders$StructReader in core/src/main/java/org/apache/iceberg/orc/OrcValueReaders.java throws 'Missing ORC reader for field s' when a struct has no remaining child readers. Compare with the Parquet path, which returns an empty struct, and start by reproducing with the Spark SQL steps in the issue. Done means the ORC read returns the row with an empty struct, with a regression test added to the ORC read tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Apache Iceberg version
main (development)
Query engine
Spark
Please describe the bug 🐞
After DROP COLUMN s.a removes the only field of s STRUCT<a:INT>, every read of existing ORC files fails with Missing ORC reader for field s. The same steps on Parquet return the row with an empty struct. Reproduced on main (2e12b22, 2026-11-25) and 1.12.0, Spark 3.5.5.
Reproduction
-- control: Parquet
CREATE TABLE local.p (id INT, s STRUCT<a:INT>) USING iceberg;
INSERT INTO local.p VALUES (1, named_struct('a', 10));
ALTER TABLE local.p DROP COLUMN s.a;
SELECT 'parquet' AS marker, id, s FROM local.p;
-- ORC: fails
CREATE TABLE local.t (id INT, s STRUCT<a:INT>) USING iceberg TBLPROPERTIES ('write.format.default'='orc');
INSERT INTO local.t VALUES (1, named_struct('a', 10));
ALTER TABLE local.t DROP COLUMN s.a;
SELECT 'orc' AS marker, id, s FROM local.t;
Expected
Both tables return the row with an empty struct, as Parquet does:
parquet 1 {}
orc 1 {}
Actual
Parquet returns parquet 1 {}. The ORC SELECT fails:
java.lang.IllegalArgumentException: Missing ORC reader for field s (2)
at org.apache.iceberg.orc.OrcValueReaders$StructReader.<init>(OrcValueReaders.java:224)
at org.apache.iceberg.spark.data.SparkOrcValueReaders$StructReader.<init>(SparkOrcValueReaders.java:154)
at org.apache.iceberg.spark.data.SparkOrcValueReaders.struct(SparkOrcValueReaders.java:78)
at org.apache.iceberg.spark.data.SparkOrcReader$ReadBuilder.record(SparkOrcReader.java:80)
at org.apache.iceberg.orc.OrcSchemaWithTypeVisitor.visitRecord(OrcSchemaWithTypeVisitor.java:80)
at org.apache.iceberg.spark.data.SparkOrcReader.<init>(SparkOrcReader.java:53)
at org.apache.iceberg.orc.OrcIterable.iterator(OrcIterable.java:118)
at org.apache.iceberg.spark.source.RowDataReader.open(RowDataReader.java:108)
at org.apache.iceberg.spark.source.BaseReader.next(BaseReader.java:145)
...
Willingness to contribute
- I can contribute a fix for this bug independently
- I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- I cannot contribute a fix for this bug at this time
- Lenguaje dominante
- Java
- Estrellas
- 9.5k
- Forks
- 3.7k
- Merge medio
- 2 d 2 h
- PR fusionados (30 d)
- 170
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Spark: Test INSERT targets with computed IDENTIFIER expressionsPosiblemente ocupada @shivadarshan-devadiga la tomó hace 15 días. Abiertoimprovement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
[Core] TestAvroPartitionStatsHandler fails on Windows due to unclosed partition statistics scanPosiblemente ocupada @Ankitkj1999 la tomó hace 17 días. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Core: TableMetadata.Builder allows adding encryption keys to v1/v2 tablesPosiblemente ocupada @yusufyildiz34 la tomó hace 37 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/iceberg#18632 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToListPosiblemente ocupada @mohamed-elbrik la tomó hace 42 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
Todos los issues de apache/iceberg
Issues similares
-
bug vault
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
bancolombia/secrets-manager#150 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
HexaHexes/neoforge-mod-template#124 ·
Los mantenedores suelen responder en 1 día
-
awaiting triage java new feature P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
source-survicate: pagination reads pagination and stops after one page; substreams drop survey_idAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
OpenLiberty/open-liberty#36410 ·
Los mantenedores suelen responder en 1 día