westonpace opened a new issue, #36792:
URL: https://github.com/apache/arrow/issues/36792

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Currently field names are figured out using this method:
   
   ```
   void ToProtoGetDepthFirstNames(const FieldVector& fields,
                                  
google::protobuf::RepeatedPtrField<std::string>* names) {
     for (const auto& field : fields) {
       *names->Add() = field->name();
   
       if (field->type()->id() == Type::STRUCT) {
         ToProtoGetDepthFirstNames(field->type()->fields(), names);
       }
     }
   }
   ```
   
   If there is a list / large list / map (dictionary? extension?) that has 
children then their names will not be included in the result.
   
   For example, given the schema:
   
   ```
     auto schema = arrow::schema(
         {arrow::field("preceding_field", arrow::int32()),
          arrow::field("points",
                       arrow::list(arrow::field(
                           "point", arrow::struct_(
                                        {arrow::field("x", arrow::float64()),
                                         arrow::field("y", 
arrow::float64())})))),
          arrow::field("trailing_field", arrow::int32())});
   ```
   
   I would expect the names to be `["preceding_field", "points", "x", "y", 
"trailing_field"]` but I only get `["preceding_field", "points", 
"trailing_field"]`.
   
   ### Component(s)
   
   C++


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