@@ -414,9 +414,15 @@ impl Metastore for ObjectStoreMetastore {
414414 stream_name : & str ,
415415 lower_bound : DateTime < Utc > ,
416416 upper_bound : DateTime < Utc > ,
417+ manifest_url : Option < String > ,
417418 ) -> Result < Option < Manifest > , MetastoreError > {
418- let path = partition_path ( stream_name, lower_bound, upper_bound) ;
419- let path = manifest_path ( path. as_str ( ) ) ;
419+ let path = match manifest_url {
420+ Some ( url) => RelativePathBuf :: from ( url) ,
421+ None => {
422+ let path = partition_path ( stream_name, lower_bound, upper_bound) ;
423+ manifest_path ( path. as_str ( ) )
424+ }
425+ } ;
420426 match self . storage . get_object ( & path) . await {
421427 Ok ( bytes) => {
422428 let manifest = serde_json:: from_slice ( & bytes) ?;
@@ -425,6 +431,18 @@ impl Metastore for ObjectStoreMetastore {
425431 Err ( ObjectStorageError :: NoSuchKey ( _) ) => Ok ( None ) ,
426432 Err ( err) => Err ( MetastoreError :: ObjectStorageError ( err) ) ,
427433 }
434+ // let path = partition_path(stream_name, lower_bound, upper_bound);
435+ // // // need a 'ends with `manifest.json` condition here'
436+ // // let obs = self
437+ // // .storage
438+ // // .get_objects(
439+ // // path,
440+ // // Box::new(|file_name| file_name.ends_with("manifest.json")),
441+ // // )
442+ // // .await?;
443+ // warn!(partition_path=?path);
444+ // let path = manifest_path(path.as_str());
445+ // warn!(manifest_path=?path);
428446 }
429447
430448 /// Get the path for a specific `Manifest` file
0 commit comments