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

Method AddFragment

cpp/src/arrow/dataset/scanner_test.cc:389–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387 : dataset_schema(std::move(dataset_schema)) {}
388
389 void AddFragment(
390 std::shared_ptr<Schema> fragment_schema,
391 std::unique_ptr<InspectedFragment> inspection = nullptr,
392 compute::Expression partition_expression = Fragment::kNoPartitionInformation) {
393 if (!inspection) {
394 inspection = std::make_unique<InspectedFragment>(fragment_schema->field_names());
395 }
396 fragments.push_back(std::make_shared<MockFragment>(
397 std::move(fragment_schema), std::vector<MockScanTask>(), std::move(inspection),
398 std::move(partition_expression)));
399 active_fragment = fragments[fragments.size() - 1]->fragment_scanner_.get();
400 }
401
402 void AddBatch(std::shared_ptr<RecordBatch> batch) {
403 active_fragment->scan_tasks_.emplace_back(std::move(batch));

Callers 4

MakeTestDatasetFunction · 0.80
TESTFunction · 0.80
MakePartitionSkipDatasetFunction · 0.80

Calls 4

field_namesMethod · 0.80
push_backMethod · 0.80
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected