tustvold commented on code in PR #2394: URL: https://github.com/apache/arrow-datafusion/pull/2394#discussion_r865329768
########## data-access/src/object_store/mod.rs: ########## @@ -80,15 +83,42 @@ pub trait ObjectStore: Sync + Send + Debug { prefix: &str, suffix: &str, ) -> Result<FileMetaStream> { - let file_stream = self.list_file(prefix).await?; - let suffix = suffix.to_owned(); - Ok(Box::pin(file_stream.filter(move |fr| { - let has_suffix = match fr { - Ok(f) => f.path().ends_with(&suffix), - Err(_) => true, Review Comment: try_filter doesn't filter out errors, see https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f7f679b078eeaf042970fc4ce212640e So this could be simplified to something like ``` use futures::future::ready; use futures::stream::TryStreamExt; ... file_stream.try_filter(move |f| ready(f.path().end_with(&suffix))) ``` TBC it isn't a blocker, just noticed it -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org