stevenzwu opened a new pull request, #19050: URL: https://github.com/apache/iceberg/pull/19050
`ContentStatsBackedMap` reads geo bound coordinates by fixed position (x, y, z, m), so a stats struct projected to a subset of coordinates fails with `ArrayIndexOutOfBoundsException` or returns the wrong coordinates. This can't happen today because `V4ManifestReader` restores the full geo bound struct, but that restore is being removed per the [discussion on #18394](https://github.com/apache/iceberg/pull/18394#discussion_r4343444449). Coordinates are now looked up by field name. A bound projected without x or y is left out of the map, because the `x:y[:z][:m]` byte encoding requires both. `isKnown` checks the encoded value, so a view whose only bounds are such partial geo bounds is still null. Test plan: - `projectedGeoBoundsInView`: a geometry bound projected without x or y is omitted, while a geography bound projected to (x, y, m) is encoded correctly alongside a primitive column. - `factoryReturnsNullWhenOnlyPartialGeoBounds`: when the only bounds are partial geo bounds, `lowerBounds` and `upperBounds` return null instead of an empty view. --- **AI Disclosure** - Model: Claude Opus 5.5 - Platform/Tool: Cursor - Human Oversight: [unknown - human to fill in] - Prompt Summary: Fix `ContentStatsBackedMap` reading projected geo bound structs by fixed position, with tests; code and tests were generated and iterated on with the author. -- 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]
