sgilmore10 opened a new pull request, #37725:
URL: https://github.com/apache/arrow/pull/37725

   ### Rationale for this change
   
   In order to implement `arrow.array.StructType`, we need to add a property 
called `Fields` to `arrow.type.Type`. This property will be a N-by-1 
`arrow.type.Field` array. Adding `Fields` will let users inspect the `Type`s 
contained by a `StructType` object.
   
   ### What changes are included in this PR?
   
   1. Added `Fields` as a property to `arrow.type.Type`. `Fields` is a 1xN 
`arrow.type.Field` array, where `N` is the number of fields.
   
   2. Added method `field(idx)` to `arrow.type.Type`. This method accepts a 
numeric index and returns the `arrow.type.Field` stored at the specified index.
   
   ### Are these changes tested?
   
   1. Yes, updated `hFixedWidthType.m` and `tStringType.m` to verify the 
behavior of the new property and method.
   2. Currently, all of the concrete `arrow.type.Type`s do not have any fields. 
This means the `Fields` property is always a 0x0 `arrow.type.Field` array. Once 
we implement `StructType`, we will be able to test having a nonempty `Fields` 
property.
   
   
   ### Are there any user-facing changes?
   
   Yes, users can now extract fields from an `arrow.type.Type` object.
   
   ### Future Directions
   
   1. #37724
   2. #37653


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