| 134 | } |
| 135 | |
| 136 | bool FileSource::Equals(const FileSource& other) const { |
| 137 | bool match_file_system = |
| 138 | (filesystem_ == nullptr && other.filesystem_ == nullptr) || |
| 139 | (filesystem_ && other.filesystem_ && filesystem_->Equals(other.filesystem_)); |
| 140 | bool match_buffer = (buffer_ == nullptr && other.buffer_ == nullptr) || |
| 141 | ((buffer_ != nullptr && other.buffer_ != nullptr) && |
| 142 | (buffer_->address() == other.buffer_->address())); |
| 143 | return match_file_system && match_buffer && file_info_.Equals(other.file_info_) && |
| 144 | compression_ == other.compression_; |
| 145 | } |
| 146 | |
| 147 | Future<std::optional<int64_t>> FileFormat::CountRows( |
| 148 | const std::shared_ptr<FileFragment>&, compute::Expression, |
no test coverage detected