[CI] Fix Snowflake V2 empty polygon orientation tests - #3242
Merged
jiayuasu merged 1 commit intoAug 7, 2026
Conversation
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.
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.
Did you read the Contributor Guide?
Is this PR related to a ticket?
[CI] my subject.What changes were proposed in this PR?
Remove the
POLYGON EMPTY/MULTIPOLYGON EMPTYassertions fromTestFunctionsV2.test_ST_IsPolygonCWandtest_ST_IsPolygonCCWin the Snowflake tester, added in #3173.These assertions can never pass against real Snowflake: the inner
ST_GeomFromWKTin 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 withRETURNS NULL ON NULL INPUT,sedona.ST_IsPolygonCW(NULL)returns NULL instead oftrue:Empty-geometry behavior of
ST_IsPolygonCW/ST_IsPolygonCCWremains covered by the WKB-based tests inTestFunctions, 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?