Yibo-Dong opened a new issue, #19137:
URL: https://github.com/apache/iceberg/issues/19137
### 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
```sql
-- 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
- [x] I cannot contribute a fix for this bug at this time
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]