xhxaidi opened a new issue, #18505:
URL: https://github.com/apache/iceberg/issues/18505
### Apache Iceberg version
main (development)
### Query engine
None
### Please describe the bug 🐞
`RESTFileScanTaskParser.fromJson` checks that `delete-file-references`
indices are
below the number of delete files, but never checks the lower bound. A server
response with `"delete-file-references": [-1]` passes the check and fails at
`allDeleteFiles.get(-1)` with `IndexOutOfBoundsException: index (-1) must
not be negative`,
which does not point at the malformed response.
Expected: an `IllegalArgumentException` like the existing out-of-range check
("Invalid delete file references: ...").
Repro: pass a plan response whose file scan task has
`"delete-file-references": [-1]`
to `PlanTableScanResponseParser.fromJson`.
### 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]