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

Function GetEmitInfo

cpp/src/arrow/engine/substrait/relation_internal.cc:79–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78template <typename RelMessage>
79Result<EmitInfo> GetEmitInfo(const RelMessage& rel,
80 const std::shared_ptr<Schema>& input_schema) {
81 const auto& emit = rel.common().emit();
82 int emit_size = emit.output_mapping_size();
83 std::vector<compute::Expression> proj_field_refs(emit_size);
84 EmitInfo emit_info;
85 FieldVector emit_fields(emit_size);
86 for (int i = 0; i < emit_size; i++) {
87 int32_t map_id = emit.output_mapping(i);
88 proj_field_refs[i] = compute::field_ref(FieldRef(map_id));
89 emit_fields[i] = input_schema->field(map_id);
90 }
91 emit_info.expressions = std::move(proj_field_refs);
92 emit_info.schema = schema(std::move(emit_fields));
93 return emit_info;
94}
95
96namespace {
97

Callers

nothing calls this directly

Calls 4

field_refFunction · 0.85
FieldRefFunction · 0.50
schemaFunction · 0.50
fieldMethod · 0.45

Tested by

no test coverage detected