iceberg maintenance: read the returned row before treating EOF as empty

parquet-go can return a row alongside io.EOF; a one-row merged file then
lost its first_row_id and the manifest list would allocate a fresh range.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Chris Lu
2026-10-08 07:10:35 -07:00
co-authored by Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent 2b05ff29e0
commit d2ae804040
+5 -4
View File
@@ -372,12 +372,13 @@ func mergedFileFirstRowID(data []byte) (*int64, error) {
return nil, nil
}
rows := make([]parquet.Row, 1)
if _, err := reader.ReadRows(rows); err != nil {
if err == io.EOF {
return nil, nil
}
n, err := reader.ReadRows(rows)
if err != nil && err != io.EOF {
return nil, err
}
if n == 0 {
return nil, nil
}
for _, v := range rows[0] {
if v.Column() != leaf.ColumnIndex {
continue