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

Method GetGuarantee

cpp/src/arrow/dataset/dataset.cc:349–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347 : ds_to_frag_map(std::move(ds_to_frag_map)), dataset_schema(dataset_schema) {}
348
349 Result<compute::Expression> GetGuarantee(
350 const std::vector<FieldPath>& dataset_schema_selection) const override {
351 std::vector<compute::Expression> missing_fields;
352 for (const FieldPath& path : dataset_schema_selection) {
353 int top_level_field_idx = path[0];
354 if (ds_to_frag_map[top_level_field_idx] < 0) {
355 missing_fields.push_back(
356 compute::is_null(compute::field_ref(top_level_field_idx)));
357 }
358 }
359 if (missing_fields.empty()) {
360 return compute::literal(true);
361 }
362 if (missing_fields.size() == 1) {
363 return missing_fields[0];
364 }
365 return compute::and_(std::move(missing_fields));
366 }
367
368 Result<std::unique_ptr<FragmentSelection>> DevolveSelection(
369 const std::vector<FieldPath>& dataset_schema_selection) const override {

Callers

nothing calls this directly

Calls 7

field_refFunction · 0.85
and_Function · 0.85
push_backMethod · 0.80
is_nullFunction · 0.50
literalFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected