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

Method AddFieldsNeededForFilter

cpp/src/arrow/dataset/scanner.cc:82–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82Status ScanV2Options::AddFieldsNeededForFilter(ScanV2Options* options) {
83 std::vector<FieldRef> fields_referenced = FieldsInExpression(options->filter);
84 for (const auto& field : fields_referenced) {
85 // Note: this will fail if the field reference is ambiguous or the field doesn't
86 // exist in the dataset schema
87 ARROW_ASSIGN_OR_RAISE(auto field_path, field.FindOne(*options->dataset->schema()));
88 if (std::find(options->columns.begin(), options->columns.end(), field_path) ==
89 options->columns.end()) {
90 options->columns.push_back(std::move(field_path));
91 }
92 }
93 return Status::OK();
94}
95
96namespace {
97class ScannerRecordBatchReader : public RecordBatchReader {

Callers

nothing calls this directly

Calls 5

FieldsInExpressionFunction · 0.85
push_backMethod · 0.80
OKFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected