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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]