Skip to content

add st_hausdorffdistance#790

Open
sapienza88 wants to merge 2 commits intoapache:mainfrom
sapienza88:st_hausdorffdistance
Open

add st_hausdorffdistance#790
sapienza88 wants to merge 2 commits intoapache:mainfrom
sapienza88:st_hausdorffdistance

Conversation

@sapienza88
Copy link
Copy Markdown

No description provided.

@github-actions github-actions Bot requested a review from zhangfengcdt April 26, 2026 18:08
@zhangfengcdt
Copy link
Copy Markdown
Member

Thanks for the contribution! Could you please clarify the use cases you want to support by adding this st function? Also,

  1. The UDF needs to be registered in rust/sedona-functions/src/register.rs inside register_scalar_udfs — otherwise it's not callable from SQL.
  2. GEOS-backed kernels in this project live in the c/sedona-geos crate (see c/sedona-geos/src/distance.rs) and use GeosExecutor. Could you move the implementation there and drop the new geos dep from rust/sedona-functions/Cargo.toml?

Also, please add the Apache license header to any new files.

@sapienza88
Copy link
Copy Markdown
Author

@zhangfengcdt thanks for the comment, I want to first ask if g1.hausdorff_distance(&g2) would work?, is hausdorff_distance already defined?

@zhangfengcdt
Copy link
Copy Markdown
Member

@zhangfengcdt thanks for the comment, I want to first ask if g1.hausdorff_distance(&g2) would work?, is hausdorff_distance already defined?

Yes, geos already support it - https://raw.githubusercontent.com/georust/geos/master/src/geometry.rs

You might want to check how this one works and follow the same pattern:
c/sedona-geos/src/distance.rs

@sapienza88
Copy link
Copy Markdown
Author

sapienza88 commented Apr 29, 2026

@zhangfengcdt yet I cannot see the defining function, could you point out to the exact logic defining the hausdorff_distance?

@sapienza88
Copy link
Copy Markdown
Author

@zhangfengcdt why the tests are in python while the implementation in rust?

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