Repository navigation
Conversation
ContentStatsBackedMap read geo bound coordinates by fixed position, so a bound projected to a subset of x, y, z, and m failed or returned the wrong coordinates. Look up coordinates by field name, and leave a bound out of the map when x or y is not projected because the bound encoding requires both. An empty view is still null when the only bounds are partial. Generated-by: Cursor (Claude Opus 5.5) Co-authored-by: Cursor <cursoragent@cursor.com>
isKnown no longer encodes a bound to decide whether it is known. It checks the projected bound type instead: a geo bound projected without x or y cannot be encoded, so it is treated as unknown, consistent with the entries the view returns. Generated-by: Cursor (Claude Opus 5.5) Co-authored-by: Cursor <cursoragent@cursor.com>
The new name states that the helper checks whether a bound type projects the geo X/Y fields. Generated-by: Cursor (Claude Opus 5.5) Co-authored-by: Cursor <cursoragent@cursor.com>
stevenzwu
marked this pull request as draft
November 20, 2026 07:12
rdblue
reviewed
Nov 20, 2026
| case LOWER_BOUND -> fieldStats.lowerBound() != null; | ||
| case UPPER_BOUND -> fieldStats.upperBound() != null; | ||
| case LOWER_BOUND -> hasBound(fieldStats, fieldStats.lowerBound(), StatsUtil.LOWER_BOUND_NAME); | ||
| case UPPER_BOUND -> hasBound(fieldStats, fieldStats.upperBound(), StatsUtil.UPPER_BOUND_NAME); |
Contributor
There was a problem hiding this comment.
I don't think this needs to change. This can still produce a map. But if there isn't enough information to produce a serialized geo bound, then it can be null when producing the lower or upper bound value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ContentStatsBackedMapreads geo bound coordinates by fixed position (x, y, z, m), so a stats struct projected to a subset of coordinates fails withArrayIndexOutOfBoundsExceptionor returns the wrong coordinates. This can't happen today becauseV4ManifestReaderrestores the full geo bound struct, but that restore is being reverted in #19070 .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.isKnowntreats such a bound as unknown, so a view whose only bounds are 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,lowerBoundsandupperBoundsreturn null instead of an empty view.AI Disclosure
ContentStatsBackedMapreading projected geo bound structs by fixed position, with tests;