benibus commented on code in PR #35197:
URL: https://github.com/apache/arrow/pull/35197#discussion_r1196711632


##########
cpp/src/arrow/type.h:
##########
@@ -1886,6 +1902,15 @@ class ARROW_EXPORT FieldRef : public 
util::EqualityComparable<FieldRef> {
     }
     return out;
   }
+  template <typename T>
+  std::vector<GetType<T>> GetAllFlattened(const T& root,
+                                          MemoryPool* pool = NULLPTR) const {
+    std::vector<GetType<T>> out;
+    for (const auto& match : FindAll(root)) {
+      out.push_back(match.GetFlattened(root, pool).ValueOrDie());

Review Comment:
   In that case, I'm a little confused as to why the non-flattened variants 
don't forward those errors either - since the standard `FieldPath::Get` methods 
can also fail (which was true prior to this PR).
   
   I'm mostly referring to `GetOne` and `GetOneAndNone` here, as they already 
return a `Result`. Regardless, I'll propagate those errors for the new methods.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to