lidavidm commented on code in PR #13490: URL: https://github.com/apache/arrow/pull/13490#discussion_r916824436
########## cpp/src/arrow/dataset/file_base.cc: ########## @@ -89,6 +89,14 @@ Result<std::shared_ptr<io::InputStream>> FileSource::OpenCompressed( return io::CompressedInputStream::Make(codec.get(), std::move(file)); } +bool FileSource::Equals(const FileSource& other) const { + bool match_file_system = + (filesystem_ == nullptr && other.filesystem_ == nullptr) || + (filesystem_ && other.filesystem_ && filesystem_->Equals(other.filesystem_)); + return file_info_.Equals(other.file_info_) && match_file_system && Review Comment: nit, but put `match_file_system` first to avoid unnecessarily evaluating `file_info_.Equals`? -- 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