benibus commented on code in PR #35798:
URL: https://github.com/apache/arrow/pull/35798#discussion_r1240156764
##########
cpp/src/arrow/dataset/file_parquet.cc:
##########
@@ -224,6 +224,41 @@ Status ResolveOneFieldRef(
return Status::OK();
}
+bool IsNamedFieldRef(const FieldRef& ref) {
+ if (ref.IsName()) return true;
+ if (const auto* nested_refs = ref.nested_refs()) {
+ for (const auto& nested_ref : *nested_refs) {
+ if (!nested_ref.IsName()) return false;
+ }
+ return true;
+ }
+ return false;
+}
Review Comment:
Moved it into `FieldRef` in the update. Looking at it now though, I suspect
it may be too niche to justify its place there - at least on its own.
Methods that transform a ref into a flat vector of names or indices might be
more useful in general (but less trivial, of course).
--
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]