You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds some geography test files with statistics that may be useful in testing implementations. Notably, geography statistics can have xmin > xmax such that row group statistics can "wrap around" the antimeridian (e.g., so that ship position statistics in the pacific ocean, or a catalogue of wildlife in Fiji do not have longitude bounds that span the globe).
The files are basically uniformly distributed (on the sphere) points, segements (basically sequential points sorted on a hilbert curve), and polygons (buffered points, basically rectangles). Both lines and polygon have some geographies that cross the antimeridian, and all the files have at least two row groups with wraparound statistics. All the files have at least one geometry intersecting the north pole and one intersecting the south pole (for polygons, the geometry contains it).
These aren't exhaustive cases for geographical testing but the addition of the wraparound statistics will hopefully help ensure pruning is correct.
Both lines and polygon have some geographies that cross the antimeridian, and all the files have at least two row groups with wraparound statistics. All the files have at least one geometry intersecting the north pole and one intersecting the south pole (for polygons, the geometry contains it).
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
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.
This PR adds some geography test files with statistics that may be useful in testing implementations. Notably, geography statistics can have
xmin > xmaxsuch that row group statistics can "wrap around" the antimeridian (e.g., so that ship position statistics in the pacific ocean, or a catalogue of wildlife in Fiji do not have longitude bounds that span the globe).I recently implemented this in SedonaDB ( apache/sedona-db#805 ) based on the pluggable statistics writer in arrow-rs ( apache/arrow-rs#8414 ).
The underlying stats are coming from s2geometry's S2LatLngRectBounder ( https://github.com/google/s2geometry/blob/master/src/s2/s2latlng_rect_bounder.h ) via s2geography ( https://github.com/paleolimbot/s2geography/blob/main/src/s2geography/coverings.h#L13-L19 ). I'd love to simplify that and just have it all in a self-contained implementation but certain components of bounding on the sphere (e.g., if a polygon contains the north pole) are non-trivial.
The files are basically uniformly distributed (on the sphere) points, segements (basically sequential points sorted on a hilbert curve), and polygons (buffered points, basically rectangles). Both lines and polygon have some geographies that cross the antimeridian, and all the files have at least two row groups with wraparound statistics. All the files have at least one geometry intersecting the north pole and one intersecting the south pole (for polygons, the geometry contains it).
These aren't exhaustive cases for geographical testing but the addition of the wraparound statistics will hopefully help ensure pruning is correct.