jorisvandenbossche commented on a change in pull request #11385:
URL: https://github.com/apache/arrow/pull/11385#discussion_r727139239



##########
File path: cpp/src/parquet/schema.cc
##########
@@ -73,6 +73,29 @@ std::shared_ptr<ColumnPath> ColumnPath::FromNode(const Node& 
node) {
   return std::make_shared<ColumnPath>(std::move(path));
 }
 
+std::shared_ptr<ColumnPath> ColumnPath::ShortFromNode(const Node& node) {
+  // Build the path in reverse order as we traverse the nodes to the top
+  std::vector<std::string> rpath_;
+  const Node* cursor = &node;
+  while (cursor->parent()) {
+    if (cursor->is_group()) {
+      auto group = dynamic_cast<const GroupNode*>(cursor);
+      // If we have a parent list node, remove the names of the two direct
+      // child nodes (list.element)
+      if (group->logical_type()->is_list()) {
+        rpath_.pop_back();
+        rpath_.pop_back();

Review comment:
       Will every list column always have the logical type set on reading? Or 
does that depend on how the Parquet file was created?




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