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


##########
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:
   Uh. Unlike `GetAll`, this can fail for various reasons such as failure to 
allocate enough memory. In that case, we'd probably want to return an error 
instead of dying out.



-- 
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