MCPcopy Create free account
hub / github.com/apache/arrow / CountRows

Method CountRows

cpp/src/arrow/dataset/file_ipc.cc:183–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183Future<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

Callers

nothing calls this directly

Calls 3

ExpressionHasFieldRefsFunction · 0.85
DeferNotOkFunction · 0.85
executorMethod · 0.45

Tested by

no test coverage detected