Copilot commented on code in PR #97:
URL: https://github.com/apache/sedona-db/pull/97#discussion_r2683686518


##########
rust/sedona-testing/src/datagen.rs:
##########
@@ -733,26 +818,44 @@ fn generate_random_circle<R: rand::Rng>(
     rng: &mut R,
     options: &RandomGeometryOptions,
 ) -> Result<(f64, f64, f64)> {
-    // Generate random diamond polygons (rotated squares)
-    let size_dist = Uniform::new(options.size_range.0, options.size_range.1)
-        .map_err(|e| DataFusionError::External(Box::new(e)))?;
-    let half_size = rng.sample(size_dist) / 2.0;
+    // Generate random circular polygons
+    let size_dist = Uniform::new_inclusive(options.size_range.0, 
options.size_range.1)
+        .map_err(|e| exec_datafusion_err!("Invalid size range for random 
region: {e}"))?;
+    let size = rng.sample(size_dist);
+    let half_size = size / 2.0;
+    let height = options.bounds.height();
+    let width = options.bounds.width();
 
     // Ensure diamond fits within bounds by constraining center position

Review Comment:
   The comment references 'diamond' but the function is generating circular 
polygons. Update the comment to say 'Ensure circle fits within bounds by 
constraining center position'.
   ```suggestion
       // Ensure circle fits within bounds by constraining center position
   ```



-- 
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]

Reply via email to