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

Method FileSource

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

Source from the content-addressed store, hash-verified

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