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

Function GetIncludedFields

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

Source from the content-addressed store, hash-verified

91}
92
93static inline Result<std::vector<int>> GetIncludedFields(
94 const Schema& schema, const std::vector<FieldRef>& materialized_fields) {
95 std::vector<int> included_fields;
96
97 for (const auto& ref : materialized_fields) {
98 ARROW_ASSIGN_OR_RAISE(auto match, ref.FindOneOrNone(schema));
99 if (match.indices().empty()) continue;
100
101 included_fields.push_back(match.indices()[0]);
102 }
103
104 return included_fields;
105}
106
107static inline Result<ipc::IpcReadOptions> GetReadOptions(
108 const Schema& schema, const FileFormat& format, const ScanOptions& scan_options) {

Callers 1

GetReadOptionsFunction · 0.70

Calls 3

indicesMethod · 0.80
push_backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected