Commits


Kevin Gurney authored and GitHub committed 0432aaed4de
GH-37182: [MATLAB] Add public `Schema` property to MATLAB `arrow.tabular.RecordBatch` class (#37184) ### Rationale for this change To make it possible to query the field types and names of a `RecordBatch`, this pull request adds a public `Schema` property to the MATLAB `arrow.tabular.RecordBatch` class. ### What changes are included in this PR? 1. Added a new public `Schema` property to the `arrow.tabular.RecordBatch` MATLAB class. ```matlab >> t = table(["A","B","C"]',[1,2,3]',[true,false,true]',VariableNames=["A", "B", "C"]) t = 3x3 table A B C ___ _ _____ "A" 1 true "B" 2 false "C" 3 true >> rb = arrow.recordbatch(t) rb = A: [ "A", "B", "C" ] B: [ 1, 2, 3 ] C: [ true, false, true ] >> schema = rb.Schema schema = A: string B: double C: bool >> schema.field(2).Name ans = "B" >> schema.field(2).Type ans = Float64Type with properties: ID: Float64 ``` ### Are these changes tested? Yes. 1. Added new test cases verifying that the `Schema` property works as expected to `tRecordBatch.m`. ### Are there any user-facing changes? Yes. 1. There is now a public `Schema` property on the `arrow.tabular.RecordBatch` MATLAB class. * Closes: #37182 Authored-by: Kevin Gurney <kgurney@mathworks.com> Signed-off-by: Kevin Gurney <kgurney@mathworks.com>