Xuanwo commented on code in PR #6787:
URL: https://github.com/apache/opendal/pull/6787#discussion_r2532829868


##########
core/src/types/read/reader.rs:
##########
@@ -601,4 +624,21 @@ mod tests {
         }
         Ok(())
     }
+
+    /// Test that partition_point returning 0 is handled correctly.
+    #[tokio::test]
+    #[allow(clippy::single_range_in_vec_init, clippy::useless_vec)]
+    async fn test_fetch_partition_point_validation() -> Result<()> {
+        // Test that partition_point returning 0 is detected and handled
+        let merged_ranges = vec![100..200];
+        let range = 50..60;

Review Comment:
   `merged_ranges` are generated from `ranges`, so it shouldn't be possible to 
have `50..60` in `100..200`.



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