corwinjoy commented on code in PR #7019:
URL: https://github.com/apache/arrow-rs/pull/7019#discussion_r1945700643
##########
object_store/src/local.rs:
##########
@@ -1401,6 +1432,66 @@ mod tests {
);
}
+ #[tokio::test]
+ async fn test_path_with_offset() {
+ let root = TempDir::new().unwrap();
+ let integration =
LocalFileSystem::new_with_prefix(root.path()).unwrap();
+
+ let root_path = root.path();
+ for i in 0..5 {
+ let filename = format!("test{}.parquet", i);
+ let file = root_path.join(filename);
+ std::fs::write(file, "test").unwrap();
+ }
+ let filter_str = "test";
+ let filter = String::from(filter_str);
+ let offset_str = filter + "1";
+ let offset = Path::from(offset_str.clone());
+
+ // Use list_with_offset to retrieve files
+ let res = integration.list_with_offset(None, &offset);
+ let offset_paths: Vec<_> = res.map_ok(|x|
x.location).try_collect().await.unwrap();
+ let mut offset_files: Vec<_> = offset_paths
+ .iter()
+ .map(|x| String::from(x.filename().unwrap()))
+ .collect();
+
+ // Check result with direct filesystem read
Review Comment:
Actually, it does not depend on this because later, in line 1485 we sort
both result sets before comparing. So the initial sort order that gets returned
does not matter.
--
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]