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

Function GetReadOptions

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

Source from the content-addressed store, hash-verified

105}
106
107static inline Result<ipc::IpcReadOptions> GetReadOptions(
108 const Schema& schema, const FileFormat& format, const ScanOptions& scan_options) {
109 ARROW_ASSIGN_OR_RAISE(
110 auto ipc_scan_options,
111 GetFragmentScanOptions<IpcFragmentScanOptions>(
112 kIpcTypeName, &scan_options, format.default_fragment_scan_options));
113 auto options =
114 ipc_scan_options->options ? *ipc_scan_options->options : default_read_options();
115 options.memory_pool = scan_options.pool;
116 if (!options.included_fields.empty()) {
117 // Cannot set them here
118 ARROW_LOG(WARNING) << "IpcFragmentScanOptions.options->included_fields was set "
119 "but will be ignored; included_fields are derived from "
120 "fields referenced by the scan";
121 }
122 ARROW_ASSIGN_OR_RAISE(options.included_fields,
123 GetIncludedFields(schema, scan_options.MaterializedFields()));
124 return options;
125}
126
127IpcFileFormat::IpcFileFormat() : FileFormat(std::make_shared<IpcFragmentScanOptions>()) {}
128

Callers

nothing calls this directly

Calls 5

default_read_optionsFunction · 0.85
MaterializedFieldsMethod · 0.80
GetIncludedFieldsFunction · 0.70
ARROW_ASSIGN_OR_RAISEFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected