Commits


sgilmore10 authored and GitHub committed 6fc44889ccc
GH-36251: [MATLAB] Add `Type` property to `arrow.array.Array` (#36270) ### Rationale for this change Now that we've added the `arrow.type.Type` class hierarchy to the interface, we should add a property named `Type` to the base `arrow.array.Array` class. ### What changes are included in this PR? All concrete subclasses of the `arrow.array.Array` define a property named `Type`: ```matlab >> a = arrow.array.Float64Array([1 2 3 4]) a = [ 1, 2, 3, 4 ] >> a.Type ans = Float64Type with properties: ID: Float64 BitWidth: 64 NumFields: 0 NumBuffers: 2 ``` ### Are these changes tested? Yes, we added test cases in `hNumeric.m` and `tBooleanArray.m`. ### Are there any user-facing changes? Yes. ### Note 1. I noticed that the `tInt16Array.m` test class did not define the `NullSubstitutionValue` property. This meant the test class was abstract, so its tests were not running. That was my mistake. We'll think about ways to verify all the appropriate tests are running in CI. 2. As @ kou mentioned, we think it may be worth creating "Type" C++ proxy classes, especially when we start implementing nested array types. For now, we'll leave them as MATLAB-only classes, but will probably change their implementation soon. 3. Thank you to @ kevingurney for the help! * Closes: #36251 Authored-by: Sarah Gilmore <sgilmore@mathworks.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>