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

   <!--
   Thanks for opening a pull request!
   If this is your first pull request you can find detailed information on how 
   to contribute here:
     * [New Contributor's 
Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
     * [Contributing 
Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
   
   
   If this is not a [minor 
PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). 
Could you open an issue for this pull request on GitHub? 
https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the 
[Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.)
 of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   -->
   
   ### Rationale for this change
   
   In order to add a `arrow.array.StructArray` MATLAB class 
(https://github.com/apache/arrow/issues/37653), we first need to implement the 
`arrow.type.StructType` MATLAB class.
   
   ### What changes are included in this PR?
   
   1. Added a new MATLAB class `arrow.type.StructType`
   2. Added convenience constructor function `arrow.struct()`
   3. Added `Struct` as a enumeration value to `arrow.type.ID`
   
   **Example Usage**
   ```matlab
   >> fieldA = arrow.field("A", arrow.int32());
   >> fieldB = arrow.field("B", arrow.timestamp(TimeZone="America/New_York"));
   >> fieldC = arrow.field("C", arrow.string());
   >> structType = arrow.struct(fieldA, fieldB, fieldC)
   
   structType = 
   
     StructType with properties:
   
           ID: Struct
       Fields: [1×3 arrow.type.Field]
   
   >> fieldBFromStruct = structType.field(2)
   
   fieldBFromStruct = 
   
   B: timestamp[us, tz=America/New_York]
   ```
   
   ### Are these changes tested?
   
   Yes.
   
   1. Added a new test class called `tStructType.m`
   2. Added a new test case to `tTypeDisplay.m`
   3. Updated test case in `tID.m`
   
   ### Are there any user-facing changes?
   
   Yes. Users can now create an `arrow.type.StructType` object using the new 
`arrow.struct()` funciton.
   
   ### Future Directions
   
   1. #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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to