ErenDursun opened a new issue, #691:
URL: https://github.com/apache/iceberg-go/issues/691

   ### Apache Iceberg version
   
   main (development)
   
   ### Please describe the bug 🐞
   
   Hi all,
   
   I've encountered an index out of range error in 
[table/scanner.go](https://github.com/apache/iceberg-go/blob/c082326e5d23ff0b2e10ec09847e6e943f0d1860/table/scanner.go#L246).
   The current implementation tries to get the relevant partition spec by index 
instead of looping over the slice and filtering by specID:
   ```
   spec := scan.metadata.PartitionSpecs()[specID]
   ```
   
   We had implemented some table maintenance tasks and we think one of them 
removed old metadata files. I think this lead to one of the partition specs 
getting removed. Therefore the partition spec with specID 1 was at slice index 
0. I'm not sure if this is allowed and the spec with specID 0 should have never 
been removed (related 
[question](https://github.com/apache/iceberg/issues/15108)), or if scanner.go 
should have just got the partition spec by specID instead of index. If the 
latter, I can contribute a fix.


-- 
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]

Reply via email to