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

Method Make

cpp/src/arrow/acero/pivot_longer_node.cc:48–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 std::vector<std::optional<FieldPath>> measurement_paths;
47
48 static Result<BoundRowTemplate> Make(const PivotLongerRowTemplate& unbound,
49 const Schema& schema) {
50 std::vector<std::optional<FieldPath>> measurement_paths;
51 for (const auto& meas_ref : unbound.measurement_values) {
52 if (meas_ref) {
53 ARROW_ASSIGN_OR_RAISE(FieldPath meas_path, meas_ref->FindOne(schema));
54 if (meas_path.indices().size() > 1) {
55 // This should actually be pretty easy to add. Just need to figure out how to
56 // convert from a nested measurement ref to a column in an exec batch
57 return Status::NotImplemented("nested measurement refs in pivot longer node");
58 }
59 measurement_paths.push_back(std::move(meas_path));
60 } else {
61 measurement_paths.push_back(std::nullopt);
62 }
63 }
64 return BoundRowTemplate(unbound.feature_values, std::move(measurement_paths));
65 }
66
67 private:
68 BoundRowTemplate(std::vector<std::string> feature_values,

Callers

nothing calls this directly

Calls 5

BoundRowTemplateClass · 0.85
indicesMethod · 0.80
push_backMethod · 0.80
NotImplementedFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected