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

Method MakeRel

cpp/src/arrow/engine/substrait/options.cc:65–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63class DefaultExtensionProvider : public BaseExtensionProvider {
64 public:
65 Result<DeclarationInfo> MakeRel(const ConversionOptions& conv_opts,
66 const std::vector<DeclarationInfo>& inputs,
67 const google::protobuf::Any& rel,
68 const ExtensionSet& ext_set) override {
69 if (rel.Is<substrait_ext::AsOfJoinRel>()) {
70 substrait_ext::AsOfJoinRel as_of_join_rel;
71 if (!rel.UnpackTo(&as_of_join_rel)) {
72 return Status::IOError("Failed to unpack AsOfJoinRel");
73 }
74 return MakeAsOfJoinRel(inputs, as_of_join_rel, ext_set);
75 }
76 if (rel.Is<substrait_ext::NamedTapRel>()) {
77 substrait_ext::NamedTapRel named_tap_rel;
78 if (!rel.UnpackTo(&named_tap_rel)) {
79 return Status::IOError("Failed to unpack NamedTapRel");
80 }
81 return MakeNamedTapRel(conv_opts, inputs, named_tap_rel, ext_set);
82 }
83 if (rel.Is<substrait_ext::SegmentedAggregateRel>()) {
84 substrait_ext::SegmentedAggregateRel seg_agg_rel;
85 if (!rel.UnpackTo(&seg_agg_rel)) {
86 return Status::IOError("Failed to unpack SegmentedAggregateRel");
87 }
88 return MakeSegmentedAggregateRel(conv_opts, inputs, seg_agg_rel, ext_set);
89 }
90 return Status::NotImplemented("Unrecognized extension in Substrait plan: ",
91 rel.DebugString());
92 }
93
94 private:
95 Result<DeclarationInfo> MakeAsOfJoinRel(

Callers

nothing calls this directly

Calls 2

IOErrorFunction · 0.85
NotImplementedFunction · 0.70

Tested by

no test coverage detected