Repository navigation
Conversation
Parquet writers (arrow-rs / Arrow C++) emit the WGS84 lon/lat default as OGC:CRS84. Iceberg tables commonly declare Geometry/Geography as EPSG:4326. After Parquet CRS validation (apache#17578), those files fail equality checks even though both identifiers refer to the same lon/lat WGS84 reference. Add Types.crsEquivalent / crsHashKey so GeometryType and GeographyType equals and hashCode treat the pair as interchangeable (case-insensitive), while leaving other schemes such as srid:4326 distinct. Closes apache#18680. Generated-by: Cursor Signed-off-by: Vincent <1729065730@qq.com>
EPSG:4326 and OGC:CRS84 are now equivalent, so the mismatch case uses EPSG:4269. Also cover pruning a file whose CRS is the equivalent identifier of the projected type.
This branch has not been deployed
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.
What changes?
GeometryType/GeographyTypeequality treated CRS identifiers as equal only with a case-insensitive string match. After #17578, Parquet files written through arrow-rs / Arrow C++ (and therefore iceberg-rust) carry the WGS84 lon/lat default asOGC:CRS84, while Iceberg tables are often declared asEPSG:4326. Validation then rejected those files even though both names refer to the same lon/lat WGS84 reference.This change adds
Types.crsEquivalent/crsHashKeyso theOGC:CRS84↔EPSG:4326pair is interchangeable for equals and hashCode (still case-insensitive). Other schemes such assrid:4326stay distinct.crs()/toString()still return the original identifier.Closes #18680.
Test plan
./gradlew :iceberg-api:test --tests org.apache.iceberg.types.TestTypes./gradlew :iceberg-api:checkstyleMain :iceberg-api:checkstyleTest spotlessCheckAI Disclosure