ORC: read fails after dropping the only field of a struct column
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- java, spark
- Ambito
- data-engineering
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Java
- Stelle
- 9.5k
- Fork
- 3.7k
- Merge medio
- 2g 2h
- PR unite (30g)
- 170
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/iceberg
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Spark: Test INSERT targets with computed IDENTIFIER expressionsForse già presa @shivadarshan-devadiga l’ha presa 15 giorni fa. Apertaimprovement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
[Core] TestAvroPartitionStatsHandler fails on Windows due to unclosed partition statistics scanForse già presa @Ankitkj1999 l’ha presa 17 giorni fa. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Core: TableMetadata.Builder allows adding encryption keys to v1/v2 tablesForse già presa @yusufyildiz34 l’ha presa 37 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/iceberg#18632 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToListForse già presa @mohamed-elbrik l’ha presa 42 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/iceberg
Issue simili
-
bug vault
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
bancolombia/secrets-manager#150 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
HexaHexes/neoforge-mod-template#124 ·
I maintainer di solito rispondono entro 1 giorno
-
awaiting triage java new feature P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
source-survicate: pagination reads pagination and stops after one page; substreams drop survey_idAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
OpenLiberty/open-liberty#36410 ·
I maintainer di solito rispondono entro 1 giorno