| 181 | } |
| 182 | |
| 183 | Future<std::optional<int64_t>> IpcFileFormat::CountRows( |
| 184 | const std::shared_ptr<FileFragment>& file, compute::Expression predicate, |
| 185 | const std::shared_ptr<ScanOptions>& options) { |
| 186 | if (ExpressionHasFieldRefs(predicate)) { |
| 187 | return Future<std::optional<int64_t>>::MakeFinished(std::nullopt); |
| 188 | } |
| 189 | auto self = checked_pointer_cast<IpcFileFormat>(shared_from_this()); |
| 190 | return DeferNotOk(options->io_context.executor()->Submit( |
| 191 | [self, file]() -> Result<std::optional<int64_t>> { |
| 192 | ARROW_ASSIGN_OR_RAISE(auto reader, OpenReader(file->source())); |
| 193 | return reader->CountRows(); |
| 194 | })); |
| 195 | } |
| 196 | |
| 197 | // |
| 198 | // IpcFileWriter, IpcFileWriteOptions |
nothing calls this directly
no test coverage detected