Skip to content

API: Fix FileRange validation order to reject negative offset/length #15922

@manuzhang

Description

@manuzhang

Apache Iceberg version

main (development)

Query engine

None

Please describe the bug 🐞

FileRange currently validates length() and offset() before assigning constructor parameters to fields. Because those getters return default field values at that point, negative constructor inputs can bypass validation.

This allows malformed ranges to propagate into vectored reads and trigger runtime failures.

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
  • I cannot contribute a fix for this bug at this time

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions