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

Method BeginScan

cpp/src/arrow/dataset/scan_node.cc:340–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338 }
339
340 Future<> BeginScan(const std::shared_ptr<InspectedFragment>& inspected_fragment) {
341 // Based on the fragment's guarantee we may not need to retrieve all the columns
342 compute::Expression fragment_filter = node->options_.filter;
343 ARROW_ASSIGN_OR_RAISE(
344 compute::Expression filter_minus_part,
345 compute::SimplifyWithGuarantee(std::move(fragment_filter),
346 fragment->partition_expression()));
347
348 ARROW_ASSIGN_OR_RAISE(
349 ExtractedKnownValues extracted,
350 ExtractKnownValuesFromGuarantee(fragment->partition_expression()));
351
352 // Now that we have an inspected fragment we need to use the dataset's evolution
353 // strategy to figure out how to scan it
354 scan_state->fragment_evolution =
355 node->options_.dataset->evolution_strategy()->GetStrategy(
356 *node->options_.dataset, *fragment, *inspected_fragment);
357 ARROW_RETURN_NOT_OK(InitFragmentScanRequest(extracted.remaining_columns,
358 filter_minus_part,
359 std::move(extracted.known_values)));
360 return fragment
361 ->BeginScan(scan_state->scan_request, *inspected_fragment,
362 node->options_.format_options,
363 node->plan_->query_context()->exec_context())
364 .Then([this](const std::shared_ptr<FragmentScanner>& fragment_scanner) {
365 return AddScanTasks(fragment_scanner);
366 });
367 }
368
369 Future<> AddScanTasks(const std::shared_ptr<FragmentScanner>& fragment_scanner) {
370 scan_state->fragment_scanner = fragment_scanner;

Callers

nothing calls this directly

Calls 4

GetStrategyMethod · 0.80
ThenMethod · 0.80
exec_contextMethod · 0.80
query_contextMethod · 0.80

Tested by

no test coverage detected