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

Method MigrateLegacyOptions

cpp/src/arrow/dataset/file_csv_test.cc:121–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 }
120
121 ScanV2Options MigrateLegacyOptions(std::shared_ptr<Fragment> fragment) {
122 std::shared_ptr<Dataset> dataset = std::make_shared<FragmentDataset>(
123 opts_->dataset_schema, FragmentVector{std::move(fragment)});
124 ScanV2Options updated(std::move(dataset));
125 updated.format_options = opts_->fragment_scan_options.get();
126 updated.filter = opts_->filter;
127 for (const auto& field : opts_->projected_schema->fields()) {
128 auto field_name = field->name();
129 EXPECT_OK_AND_ASSIGN(FieldPath field_path,
130 FieldRef(field_name).FindOne(*opts_->dataset_schema));
131 updated.columns.push_back(field_path);
132 }
133 return updated;
134 }
135
136 RecordBatchIterator Batches(const std::shared_ptr<Fragment>& fragment) {
137 if (UseScanV2()) {

Callers

nothing calls this directly

Calls 4

push_backMethod · 0.80
getMethod · 0.45
fieldsMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected