wgtmac commented on code in PR #43995:
URL: https://github.com/apache/arrow/pull/43995#discussion_r1822261145
##########
cpp/src/parquet/arrow/schema.cc:
##########
@@ -513,11 +513,13 @@ Status PopulateLeaf(int column_index, const
std::shared_ptr<Field>& field,
}
// Special case mentioned in the format spec:
-// If the name is array or ends in _tuple, this should be a list of struct
-// even for single child elements.
-bool HasStructListName(const GroupNode& node) {
+// If the name is array or uses the parent's name with `_tuple` appended,
+// this should be:
+// - a list of list or map type if the repeated group node is LIST- or
MAP-annotated.
+// - otherwise, a list of struct even for single child elements.
+bool HasListElementName(const GroupNode& node, const GroupNode& parent) {
::std::string_view name{node.name()};
- return name == "array" || EndsWith(name, "_tuple");
+ return name == "array" || name == (parent.name() + "_tuple");
Review Comment:
@emkornfield Fix the matching of `_tuple` to follow the spec.
--
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]