Skip to content

Core: Read geometry and geography bounds as GeospatialBound - #18394

Open
stevenzwu wants to merge 2 commits into
apache:mainfrom
stevenzwu:geospatial-bound-struct-like
Open

stevenzwu wants to merge 2 commits into
apache:mainfrom
stevenzwu:geospatial-bound-struct-like

Conversation

@stevenzwu

Copy link
Copy Markdown
Contributor

Materialize v4 manifest geometry and geography lower and upper bounds as GeospatialBound so callers receive the bound type, and copy reused reader instances when field stats are copied.

private static Object copyBound(Object bound) {
if (bound instanceof byte[] bytes) {
return copyOf(bytes);
} else if (bound instanceof StructLike struct) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the usage PartitionData and updated serialization test in TestFieldStatsStruct so that we can remove this copy branch.

@stevenzwu
stevenzwu force-pushed the geospatial-bound-struct-like branch from 0285f3d to 5cb995d Compare October 7, 2026 04:28
stevenzwu and others added 2 commits October 6, 2026 21:40
Materialize v4 manifest geometry and geography lower and upper bounds as GeospatialBound so callers receive the bound type, and copy reused reader instances when field stats are copied.

Generated-by: Grok 4.7
Co-authored-by: Cursor <cursoragent@cursor.com>
Geo field stats now store GeospatialBound, so copyBound no longer copies an arbitrary StructLike. GeospatialBound is Serializable, and the InternalData test read registers that type when the column is geometry or geography.

Generated-by: Grok 4.7
@stevenzwu
stevenzwu force-pushed the geospatial-bound-struct-like branch from 5cb995d to 3de75a4 Compare October 7, 2026 04:40
@stevenzwu
stevenzwu requested a review from nastra October 7, 2026 04:53
@stevenzwu

Copy link
Copy Markdown
Contributor Author

cc @anoopj

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant