| 105 | } |
| 106 | |
| 107 | static 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 | |
| 127 | IpcFileFormat::IpcFileFormat() : FileFormat(std::make_shared<IpcFragmentScanOptions>()) {} |
| 128 |
nothing calls this directly
no test coverage detected