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

Method FileSource

cpp/src/arrow/dataset/file_base.cc:61–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59namespace dataset {
60
61FileSource::FileSource(std::shared_ptr<io::RandomAccessFile> file,
62 Compression::type compression)
63 : custom_open_([=] { return ToResult(file); }),
64 custom_size_(-1),
65 compression_(compression) {
66 Result<int64_t> maybe_size = file->GetSize();
67 if (maybe_size.ok()) {
68 custom_size_ = *maybe_size;
69 } else {
70 custom_open_ = [st = maybe_size.status()] { return st; };
71 }
72}
73
74Result<std::shared_ptr<io::RandomAccessFile>> FileSource::Open() const {
75 if (filesystem_) {

Callers

nothing calls this directly

Calls 4

ToResultFunction · 0.85
GetSizeMethod · 0.45
okMethod · 0.45
statusMethod · 0.45

Tested by

no test coverage detected