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

Function CreateDirectReference

cpp/src/arrow/engine/substrait/test_plan_builder.cc:64–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void CreateDirectReference(int32_t index, substrait::Expression* expr) {
65 auto reference = std::make_unique<substrait::Expression::FieldReference>();
66 auto reference_segment = std::make_unique<substrait::Expression::ReferenceSegment>();
67 auto struct_field =
68 std::make_unique<substrait::Expression::ReferenceSegment::StructField>();
69 struct_field->set_field(index);
70 reference_segment->set_allocated_struct_field(struct_field.release());
71 reference->set_allocated_direct_reference(reference_segment.release());
72
73 auto root_reference =
74 std::make_unique<substrait::Expression::FieldReference::RootReference>();
75 reference->set_allocated_root_reference(root_reference.release());
76 expr->set_allocated_selection(reference.release());
77}
78
79Result<std::unique_ptr<substrait::ProjectRel>> CreateProject(
80 Id function_id, const std::vector<std::string>& arguments,

Callers 2

CreateProjectFunction · 0.85
CreateAggFunction · 0.85

Calls 1

releaseMethod · 0.45

Tested by

no test coverage detected