ayushtkn opened a new issue, #15507:
URL: https://github.com/apache/iceberg/issues/15507
### Apache Iceberg version
None
### Query engine
None
### Please describe the bug 🐞
When an Avro file contains row lineage columns `(ROW_ID,
LAST_UPDATED_SEQUENCE_NUMBER)` but the reader schema does not project those
columns, reading the file fails.
This happens because the reader does not project the lineage columns, but
the Avro file still contains them. When reading through `DataFileStream`, this
results in decoder misalignment and the following error:
```
Caused by: org.apache.hive.iceberg.org.apache.avro.AvroRuntimeException:
java.io.IOException: Block read partially, the data may be corrupt
at
org.apache.hive.iceberg.org.apache.avro.file.DataFileStream.hasNext(DataFileStream.java:237)
at
org.apache.iceberg.avro.AvroIterable$AvroRangeIterator.hasNext(AvroIterable.java:140)
at
org.apache.iceberg.io.CloseableIterator$1.hasNext(CloseableIterator.java:50)
at
org.apache.iceberg.io.FilterIterator.advance(FilterIterator.java:64)
at
org.apache.iceberg.io.FilterIterator.hasNext(FilterIterator.java:49)
```
This issue occurs only with the Avro reader. The Parquet reader correctly
handles the case where row lineage columns exist in the file but are not
projected by the reader.
### Willingness to contribute
- [x] 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
--
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]