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

Function OpenORCReader

cpp/src/arrow/dataset/file_orc.cc:40–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace {
39
40Result<std::unique_ptr<arrow::adapters::orc::ORCFileReader>> OpenORCReader(
41 const FileSource& source,
42 const std::shared_ptr<ScanOptions>& scan_options = nullptr) {
43 ARROW_ASSIGN_OR_RAISE(auto input, source.Open());
44
45 arrow::MemoryPool* pool;
46 if (scan_options) {
47 pool = scan_options->pool;
48 } else {
49 pool = default_memory_pool();
50 }
51
52 auto reader = arrow::adapters::orc::ORCFileReader::Open(std::move(input), pool);
53 auto status = reader.status();
54 if (!status.ok()) {
55 return status.WithMessage("Could not open ORC input source '", source.path(),
56 "': ", status.message());
57 }
58 return reader;
59}
60
61/// \brief A ScanTask backed by an ORC file.
62class OrcScanTask {

Callers 1

IsSupportedMethod · 0.85

Calls 4

default_memory_poolFunction · 0.85
statusMethod · 0.45
okMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected