Skip to content

feat(rust/sedona-functions): Implement ST_Force3DM and ST_Force4D#620

Merged
paleolimbot merged 6 commits intoapache:mainfrom
yutannihilation:feat/st_force4d
Feb 15, 2026
Merged

feat(rust/sedona-functions): Implement ST_Force3DM and ST_Force4D#620
paleolimbot merged 6 commits intoapache:mainfrom
yutannihilation:feat/st_force4d

Conversation

@yutannihilation
Copy link
Contributor

Part of #554

This pull request implements ST_Force3DM and ST_Force4D.

I tried to unify all ST_Force*, but it seems it would make handling of optional args tricky (you can see the attempt at d9f46ed). So, this simply duplicate and tweak the code based on the existing ST_Force2D and ST_Force3D.

@yutannihilation
Copy link
Contributor Author

The suspicious diff of rust/sedona-functions/src/st_force_dim.rs is because the current file uses CRLF for line break. This was my fault when I created this file on Windows. Sorry...

Comment on lines +461 to +462
Dimensions::Xym => (coord.x(), coord.y(), coord.nth_or_panic(2)),
Dimensions::Xyzm => (coord.x(), coord.y(), coord.nth_or_panic(3)),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed this logic added in #619 was wrong. Fixed now.

@yutannihilation yutannihilation marked this pull request as ready for review February 15, 2026 01:20
Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

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

Thank you!

These functions are some of the least glorious but most essential functions...thank you for taking this on!

@paleolimbot paleolimbot merged commit a4f3fee into apache:main Feb 15, 2026
17 checks passed
@yutannihilation yutannihilation deleted the feat/st_force4d branch February 15, 2026 02:22
@paleolimbot paleolimbot added this to the 0.3.0 milestone Feb 19, 2026
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