Skip to content

[GH-2392] Test single-member GeometryCollection - #3326

Merged
jiayuasu merged 2 commits into
apache:masterfrom
ryux1:ryux1/test-empty-geometries
Sep 6, 2026
Merged

[GH-2392] Test single-member GeometryCollection#3326
jiayuasu merged 2 commits into
apache:masterfrom
ryux1:ryux1/test-empty-geometries

Conversation

@ryux1

@ryux1 ryux1 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Did you read the Contributor Guide?

The contributor rules and Python development/test instructions were reviewed while preparing this patch.

Is this PR related to a ticket?

Yes. Partially addresses #2392.

What changes were proposed in this PR?

Extend the shared GeoSeries parity fixtures with a missing single-member GeometryCollection containing a closed LineString. Because self.geomcollection is part of self.geoms, the case flows through the existing Sedona-versus-GeoPandas checks, including construction, serialization, predicates, measurements, transformations, and is_closed.

The initial revision also included a collection whose members were all typed empty geometries. The full matrix demonstrated a distinct to_arrow WKB dimensionality mismatch for that shape, now tracked separately in #3329; it was removed here rather than masking a real defect with an expected failure.

How was this patch tested?

  • Black 26.5.1 formatting check
  • Python bytecode compilation
  • git diff --check
  • Reference GeoPandas 1.1+ / Shapely 2.1+ evaluation of the fixture, including is_empty, is_valid, is_closed, has_z, geom_type, length, area, and count_geometries
  • Upstream CI on the initial revision: 2,092 tests passed and the only failure was the separately tracked all-empty-member serialization mismatch in GeoSeries.to_arrow differs for all-empty GeometryCollection members #3329
  • Focused distributed checks for the narrowed fixture: constructor plus all four explode variants passed (5 tests)
  • Broader fail-fast run: 44 passed and 1 skipped before test_coverage_validation reached an internal JVM function absent from the released Sedona 1.9.0 shaded JAR used locally

Did this PR include necessary documentation updates?

No. This only expands test coverage and does not change a public API.

@ryux1
ryux1 requested a review from jiayuasu as a code owner September 6, 2026 02:13
@ryux1
ryux1 force-pushed the ryux1/test-empty-geometries branch from ea922dc to daeb0a5 Compare September 6, 2026 02:18
@ryux1 ryux1 changed the title [GH-2392] Test GeometryCollection edge cases [GH-2392] Test single-member GeometryCollection Sep 6, 2026
@ryux1
ryux1 force-pushed the ryux1/test-empty-geometries branch from 6eaccfb to 2bba3dc Compare September 6, 2026 04:04

@jiayuasu jiayuasu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@jiayuasu
jiayuasu merged commit 7a0763e into apache:master Sep 6, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants