You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "Copilot (via GitHub)" <gi...@apache.org> on 2026/01/11 06:57:42 UTC
Re: [PR] feat(rust/sedona): Improve sd_random_geometry() and expose as a Python function [sedona-db]
Copilot commented on code in PR #97:
URL: https://github.com/apache/sedona-db/pull/97#discussion_r2679287130
##########
rust/sedona-testing/src/datagen.rs:
##########
@@ -490,6 +522,52 @@ impl RandomGeometryOptions {
num_parts_range: (1, 3),
}
}
+
+ fn validate(&self) -> Result<()> {
+ if self.bounds.width() <= 0.0 || self.bounds.height() <= 0.0 {
+ return plan_err!("Expected valid bounds but got {:?}", self.bounds);
+ }
+
+ if self.bounds.width() <= 0.0 || self.bounds.height() <= 0.0 {
+ return plan_err!("Expected valid bounds but got {:?}", self.bounds);
+ }
+
Review Comment:
Duplicate validation logic for bounds. Lines 527-529 and 531-533 check the exact same condition. Remove one of these duplicate checks.
```suggestion
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org