API, Core: Add geometry and geography types support #12346
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 adds 2 primitive types to
iceberg-api
andiceberg-core
for supporting geospatial data types, partially implementing the iceberg geo spec: #10981The newly added primitive types are:
geometry(C)
: geometries with linear/planar edge interpolationgeography(C, A)
: geometries with non-linear edge interpolation, the algorithm for interpolating edges is parameterized byA
.This patch also adds 2 expressions for filtering spatial values:
ST_INTERSECT(geom1: geometry, geom2: geometry)
orST_INTERSECT(geog1: geography, geog2: geography)
: test if 2 spatial objects intersect with each other.ST_COVERS(geom1: geometry, geom2: geometry)
orST_COVERS(geog1: geography, geog2: geography)
: test if one spatial object completely covers the other spatial object.Currently we have implemented these 2 expressions for geometry values, the implementation for geography values is not fully implemented yet. We are looking into supporting geography with spherical edge interpolation algorithm using approaches similar to https://github.com/paleolimbot/s2geography.