Skip to content

[CI] Fix Snowflake V2 empty polygon orientation tests - #3242

Merged
jiayuasu merged 1 commit into
apache:masterfrom
jiayuasu:fix/snowflake-v2-empty-polygon-tests
Aug 7, 2026
Merged

[CI] Fix Snowflake V2 empty polygon orientation tests#3242
jiayuasu merged 1 commit into
apache:masterfrom
jiayuasu:fix/snowflake-v2-empty-polygon-tests

Conversation

@jiayuasu

@jiayuasu jiayuasu commented Aug 7, 2026

Copy link
Copy Markdown
Member

Did you read the Contributor Guide?

Is this PR related to a ticket?

  • No: this is a CI update. The PR name follows the format [CI] my subject.

What changes were proposed in this PR?

Remove the POLYGON EMPTY / MULTIPOLYGON EMPTY assertions from TestFunctionsV2.test_ST_IsPolygonCW and test_ST_IsPolygonCCW in the Snowflake tester, added in #3173.

These assertions can never pass against real Snowflake: the inner ST_GeomFromWKT in the V2 tests is Snowflake's built-in WKT parser, and Snowflake's native GEOMETRY type parses empty geometries to NULL. Since Sedona UDFs are registered with RETURNS NULL ON NULL INPUT, sedona.ST_IsPolygonCW(NULL) returns NULL instead of true:

TestFunctionsV2.test_ST_IsPolygonCW:1214   expected:<true> but was:<null>
TestFunctionsV2.test_ST_IsPolygonCCW:1247  expected:<true> but was:<null>

Empty-geometry behavior of ST_IsPolygonCW/ST_IsPolygonCCW remains covered by the WKB-based tests in TestFunctions, where geometry serialization stays fully in Sedona's control.

How was this patch tested?

Verified against a real Snowflake environment in wherobots/sedona-cloud-vendor-tester#72: the full Snowflake integration suite passed with this change (run, 383 tests, 0 failures), where master previously failed the two assertions above (failing run).

Did this PR include necessary documentation updates?

  • No, this PR does not affect any public API so no need to change the documentation.

Snowflake's native GEOMETRY type parses 'POLYGON EMPTY' and
'MULTIPOLYGON EMPTY' to NULL, and Sedona UDFs are registered with
RETURNS NULL ON NULL INPUT, so ST_IsPolygonCW/ST_IsPolygonCCW return
NULL instead of true in the V2 (native GEOMETRY) path. Empty-geometry
behavior remains covered by the WKB-based tests in TestFunctions.
@jiayuasu
jiayuasu merged commit 4566488 into apache:master Aug 7, 2026
10 checks passed
@jiayuasu
jiayuasu deleted the fix/snowflake-v2-empty-polygon-tests branch August 7, 2026 04:44
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.

1 participant