From 1d325e61fc406d24ce95e615719dbd061840c90e Mon Sep 17 00:00:00 2001 From: Sarah Gilmore Date: Mon, 6 Nov 2023 15:34:57 -0500 Subject: [PATCH 1/9] Register slice as a proxy method on the Array C++ proxy class --- matlab/src/cpp/arrow/matlab/array/proxy/array.cc | 6 +++++- matlab/src/cpp/arrow/matlab/array/proxy/array.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/matlab/src/cpp/arrow/matlab/array/proxy/array.cc b/matlab/src/cpp/arrow/matlab/array/proxy/array.cc index 09d9473df47..b145e07a1cc 100644 --- a/matlab/src/cpp/arrow/matlab/array/proxy/array.cc +++ b/matlab/src/cpp/arrow/matlab/array/proxy/array.cc @@ -38,7 +38,7 @@ namespace arrow::matlab::array::proxy { REGISTER_METHOD(Array, getValid); REGISTER_METHOD(Array, getType); REGISTER_METHOD(Array, isEqual); - + REGISTER_METHOD(Array, slice); } std::shared_ptr Array::unwrap() { @@ -144,4 +144,8 @@ namespace arrow::matlab::array::proxy { mda::ArrayFactory factory; context.outputs[0] = factory.createScalar(is_equal); } + + void Array::slice(libmexclass::proxy::method::Context& context) { + // TODO: Implement + } } diff --git a/matlab/src/cpp/arrow/matlab/array/proxy/array.h b/matlab/src/cpp/arrow/matlab/array/proxy/array.h index 0ab7b279bc9..1e3164ed01a 100644 --- a/matlab/src/cpp/arrow/matlab/array/proxy/array.h +++ b/matlab/src/cpp/arrow/matlab/array/proxy/array.h @@ -44,6 +44,8 @@ class Array : public libmexclass::proxy::Proxy { void isEqual(libmexclass::proxy::method::Context& context); + void slice(libmexclass::proxy::method::Context& context); + std::shared_ptr array; }; From daf0e94cf2e23e50c4e7f58bb0c995d6c3704a3d Mon Sep 17 00:00:00 2001 From: Sarah Gilmore Date: Mon, 6 Nov 2023 16:24:45 -0500 Subject: [PATCH 2/9] Implement proxy::Array::slice method --- .../src/cpp/arrow/matlab/array/proxy/array.cc | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/matlab/src/cpp/arrow/matlab/array/proxy/array.cc b/matlab/src/cpp/arrow/matlab/array/proxy/array.cc index b145e07a1cc..4f1821e2b14 100644 --- a/matlab/src/cpp/arrow/matlab/array/proxy/array.cc +++ b/matlab/src/cpp/arrow/matlab/array/proxy/array.cc @@ -18,6 +18,7 @@ #include "arrow/util/utf8.h" #include "arrow/matlab/array/proxy/array.h" +#include "arrow/matlab/array/proxy/wrap.h" #include "arrow/matlab/bit/unpack.h" #include "arrow/matlab/error/error.h" #include "arrow/matlab/type/proxy/wrap.h" @@ -146,6 +147,33 @@ namespace arrow::matlab::array::proxy { } void Array::slice(libmexclass::proxy::method::Context& context) { - // TODO: Implement + namespace mda = ::matlab::data; + + mda::StructArray opts = context.inputs[0]; + const mda::TypedArray offset_mda = opts[0]["Offset"]; + const mda::TypedArray length_mda = opts[0]["Length"]; + + const auto matlab_offset = int64_t(offset_mda[0]); + if (matlab_offset < 1) { + context.error = libmexclass::error::Error{"arrow:array:slice:NonpositiveOffset", "Offset must be positive"}; + } + + // Note: MATLAB uses 1-based indexing, so subtract 1. + const int64_t offset = matlab_offset - 1; + const int64_t length = int64_t(length_mda[0]); + + auto sliced_array = array->Slice(offset, length); + const auto type_id = static_cast(sliced_array->type_id()); + MATLAB_ASSIGN_OR_ERROR_WITH_CONTEXT(auto sliced_array_proxy, + array::proxy::wrap(sliced_array), + context, + "arrow:array:FailedToCreateArrayProxy"); + const auto proxy_id = libmexclass::proxy::ProxyManager::manageProxy(sliced_array_proxy); + + mda::ArrayFactory factory; + mda::StructArray output = factory.createStructArray({1, 1}, {"ProxyID", "TypeID"}); + output[0]["ProxyID"] = factory.createScalar(proxy_id); + output[0]["TypeID"] = factory.createScalar(type_id); + context.outputs[0] = output; } } From 649f2687b2e8dde62df04b0ee3cc820f036da6b7 Mon Sep 17 00:00:00 2001 From: Sarah Gilmore Date: Tue, 7 Nov 2023 16:38:47 -0500 Subject: [PATCH 3/9] Add slice method to arrow.array.slice --- matlab/src/matlab/+arrow/+array/Array.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/matlab/src/matlab/+arrow/+array/Array.m b/matlab/src/matlab/+arrow/+array/Array.m index 293ad87ad43..4402055932b 100644 --- a/matlab/src/matlab/+arrow/+array/Array.m +++ b/matlab/src/matlab/+arrow/+array/Array.m @@ -98,4 +98,14 @@ function displayScalarObject(obj) tf = obj.Proxy.isEqual(proxyIDs); end end + + methods (Hidden) + function array = slice(obj, offset, length) + sliceStruct = struct(Offset=offset, Length=length); + arrayStruct = obj.Proxy.slice(sliceStruct); + traits = arrow.type.traits.traits(arrow.type.ID(arrayStruct.TypeID)); + proxy = libmexclass.proxy.Proxy(Name=traits.ArrayProxyClassName, ID=arrayStruct.ProxyID); + array = traits.ArrayConstructor(proxy); + end + end end From 52e5065e6f012f091125e24b5d2c33ee9ba755ad Mon Sep 17 00:00:00 2001 From: Sarah Gilmore Date: Wed, 8 Nov 2023 14:09:18 -0500 Subject: [PATCH 4/9] Add unit tests the slice method of arrow.array.Array --- matlab/test/arrow/array/tSlice.m | 101 +++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 matlab/test/arrow/array/tSlice.m diff --git a/matlab/test/arrow/array/tSlice.m b/matlab/test/arrow/array/tSlice.m new file mode 100644 index 00000000000..49b16b1754b --- /dev/null +++ b/matlab/test/arrow/array/tSlice.m @@ -0,0 +1,101 @@ +%TSLICE Unit tests for the slice method of arrow.array.Array + +% Licensed to the Apache Software Foundation (ASF) under one or more +% contributor license agreements. See the NOTICE file distributed with +% this work for additional information regarding copyright ownership. +% The ASF licenses this file to you under the Apache License, Version +% 2.0 (the "License"); you may not use this file except in compliance +% with the License. You may obtain a copy of the License at +% +% http://www.apache.org/licenses/LICENSE-2.0 +% +% Unless required by applicable law or agreed to in writing, software +% distributed under the License is distributed on an "AS IS" BASIS, +% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +% implied. See the License for the specific language governing +% permissions and limitations under the License. + +classdef tSlice < matlab.unittest.TestCase + + methods(Test) + function BooleanArray(testCase) + boolArray = arrow.array([true true false true true false], Valid=[1 2 3 6]); + slice = boolArray.slice(int64(2), int64(4)); + testCase.verifyEqual(slice.NumElements, int64(4)); + testCase.verifyEqual(slice.Valid, [true; true; false; false]); + testCase.verifyEqual(toMATLAB(slice), [true; false; false; false]); + end + + function NumericArray(testCase) + float64Array = arrow.array(1:10, Valid=[2 3 4 5 8 10]); + slice = float64Array.slice(int64(4), int64(5)); + testCase.verifyEqual(slice.NumElements, int64(5)); + testCase.verifyEqual(slice.Valid, [true; true; false; false; true]); + testCase.verifyEqual(toMATLAB(slice), [4; 5; NaN; NaN; 8]); + end + + function DateArray(testCase) + import arrow.array.Date32Array + dates = datetime(2023, 11, 8:16); + date32Array = Date32Array.fromMATLAB(dates, Valid=[4 5 6 9]); + slice = date32Array.slice(int64(3), int64(4)); + testCase.verifyEqual(slice.NumElements, int64(4)); + testCase.verifyEqual(slice.Valid, [false; true; true; true]); + expected = [NaT; dates(4:6)']; + testCase.verifyEqual(toMATLAB(slice), expected); + end + + function TimeArray(testCase) + times = seconds(10:20); + time64Array = arrow.array(times, Valid=[2 4 6 7 8 10]); + slice = time64Array.slice(int64(5), int64(6)); + testCase.verifyEqual(slice.NumElements, int64(6)); + testCase.verifyEqual(slice.Valid, [false; true; true; true; false; true]); + expected = [NaN; times(6:8)'; NaN; times(10)]; + testCase.verifyEqual(toMATLAB(slice), expected); + end + + function TimestampArray(testCase) + dates = datetime(2023, 11, 8:16); + date32Array = arrow.array(dates, Valid=[1 2 4 5 6 8]); + slice = date32Array.slice(int64(5), int64(3)); + testCase.verifyEqual(slice.NumElements, int64(3)); + testCase.verifyEqual(slice.Valid, [true; true; false]); + expected = [dates(5:6)'; NaT]; + testCase.verifyEqual(toMATLAB(slice), expected); + end + + function StringArray(testCase) + stringArray = arrow.array(["a" "b" "c" "d" "e" "f" "g"], Valid=[1 3 4 5 6]); + slice = stringArray.slice(int64(2), int64(3)); + testCase.verifyEqual(slice.NumElements, int64(3)); + testCase.verifyEqual(slice.Valid, [false; true; true]); + expected = [missing; "c"; "d"]; + testCase.verifyEqual(toMATLAB(slice), expected); + end + + function ListArray(testCase) + cellArray = {missing, [1, 2, 3], missing, [4, NaN], [6, 7, 8], missing}; + listArray = arrow.array(cellArray); + slice = listArray.slice(int64(2), int64(4)); + testCase.verifyEqual(slice.NumElements, int64(4)); + testCase.verifyEqual(slice.Valid, [true; false; true; true]); + expected = {[1; 2; 3]; missing; [4; NaN]; [6; 7; 8]}; + testCase.verifyEqual(toMATLAB(slice), expected); + end + + function StructArray(testCase) + numbers = [NaN; 2; 3; 4; 5; 6; 7; NaN; 9; 10]; + text = ["a"; missing; "c"; "d"; "e"; missing; "g"; "h"; "i"; "j"]; + t = table(numbers, text); + structArray = arrow.array(t, Valid=[1 2 3 6 7 8 10]); + slice = structArray.slice(int64(5), int64(4)); + testCase.verifyEqual(slice.NumElements, int64(4)); + testCase.verifyEqual(slice.Valid, [false; true; true; true]); + expected = t(5:8, :); + expected.numbers(1) = NaN; + expected.text(1) = missing; + testCase.verifyEqual(toMATLAB(slice), expected); + end + end +end \ No newline at end of file From 50f1aa813a2209c70d378aba47d4ffcda3ea030b Mon Sep 17 00:00:00 2001 From: Sarah Gilmore Date: Wed, 8 Nov 2023 14:49:42 -0500 Subject: [PATCH 5/9] Add validateSliceOffset and validateSliceLength helper utilities --- matlab/src/cpp/arrow/matlab/array/proxy/array.cc | 15 ++++++++++----- matlab/src/cpp/arrow/matlab/index/validate.cc | 16 ++++++++++++++++ matlab/src/cpp/arrow/matlab/index/validate.h | 3 +++ 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/matlab/src/cpp/arrow/matlab/array/proxy/array.cc b/matlab/src/cpp/arrow/matlab/array/proxy/array.cc index 4f1821e2b14..a345a6220aa 100644 --- a/matlab/src/cpp/arrow/matlab/array/proxy/array.cc +++ b/matlab/src/cpp/arrow/matlab/array/proxy/array.cc @@ -21,6 +21,7 @@ #include "arrow/matlab/array/proxy/wrap.h" #include "arrow/matlab/bit/unpack.h" #include "arrow/matlab/error/error.h" +#include "arrow/matlab/index/validate.h" #include "arrow/matlab/type/proxy/wrap.h" #include "arrow/pretty_print.h" #include "arrow/type_traits.h" @@ -154,20 +155,24 @@ namespace arrow::matlab::array::proxy { const mda::TypedArray length_mda = opts[0]["Length"]; const auto matlab_offset = int64_t(offset_mda[0]); - if (matlab_offset < 1) { - context.error = libmexclass::error::Error{"arrow:array:slice:NonpositiveOffset", "Offset must be positive"}; - } + + MATLAB_ERROR_IF_NOT_OK_WITH_CONTEXT(arrow::matlab::index::validateSliceOffset(matlab_offset), + context, "arrow:array:slice:NonPositiveOffset"); + // Note: MATLAB uses 1-based indexing, so subtract 1. const int64_t offset = matlab_offset - 1; const int64_t length = int64_t(length_mda[0]); + MATLAB_ERROR_IF_NOT_OK_WITH_CONTEXT(arrow::matlab::index::validateSliceLength(length), + context, "arrow:array:slice:NegativeLength"); + auto sliced_array = array->Slice(offset, length); const auto type_id = static_cast(sliced_array->type_id()); MATLAB_ASSIGN_OR_ERROR_WITH_CONTEXT(auto sliced_array_proxy, array::proxy::wrap(sliced_array), - context, - "arrow:array:FailedToCreateArrayProxy"); + context, "arrow:array:FailedToCreateArrayProxy"); + const auto proxy_id = libmexclass::proxy::ProxyManager::manageProxy(sliced_array_proxy); mda::ArrayFactory factory; diff --git a/matlab/src/cpp/arrow/matlab/index/validate.cc b/matlab/src/cpp/arrow/matlab/index/validate.cc index b24653f1b81..84e8e424e17 100644 --- a/matlab/src/cpp/arrow/matlab/index/validate.cc +++ b/matlab/src/cpp/arrow/matlab/index/validate.cc @@ -53,4 +53,20 @@ namespace arrow::matlab::index { } return arrow::Status::OK(); } + + arrow::Status validateSliceOffset(const int64_t matlab_offset) { + if (matlab_offset < 1) { + const std::string msg = "Slice offset must be positive"; + return arrow::Status::Invalid(std::move(msg)); + } + return arrow::Status::OK(); + } + + arrow::Status validateSliceLength(const int64_t length) { + if (length < 0) { + const std::string msg = "Slice length must be nonnegative"; + return arrow::Status::Invalid(std::move(msg)); + } + return arrow::Status::OK(); + } } \ No newline at end of file diff --git a/matlab/src/cpp/arrow/matlab/index/validate.h b/matlab/src/cpp/arrow/matlab/index/validate.h index 40e109c19e9..2fa88ef8f1b 100644 --- a/matlab/src/cpp/arrow/matlab/index/validate.h +++ b/matlab/src/cpp/arrow/matlab/index/validate.h @@ -23,4 +23,7 @@ namespace arrow::matlab::index { arrow::Status validateNonEmptyContainer(const int32_t num_fields); arrow::Status validateInRange(const int32_t matlab_index, const int32_t num_fields); + arrow::Status validateSliceOffset(const int64_t matlab_offset); + arrow::Status validateSliceLength(const int64_t length); + } \ No newline at end of file From 123c148cdab6cc6b8a2e88f8e732675594f9524b Mon Sep 17 00:00:00 2001 From: Sarah Gilmore Date: Wed, 8 Nov 2023 15:14:09 -0500 Subject: [PATCH 6/9] Add error message id variables --- matlab/src/cpp/arrow/matlab/array/proxy/array.cc | 11 ++++------- matlab/src/cpp/arrow/matlab/error/error.h | 4 ++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/matlab/src/cpp/arrow/matlab/array/proxy/array.cc b/matlab/src/cpp/arrow/matlab/array/proxy/array.cc index a345a6220aa..bc5ab093b45 100644 --- a/matlab/src/cpp/arrow/matlab/array/proxy/array.cc +++ b/matlab/src/cpp/arrow/matlab/array/proxy/array.cc @@ -154,24 +154,21 @@ namespace arrow::matlab::array::proxy { const mda::TypedArray offset_mda = opts[0]["Offset"]; const mda::TypedArray length_mda = opts[0]["Length"]; - const auto matlab_offset = int64_t(offset_mda[0]); - + const auto matlab_offset = int64_t(offset_mda[0]); MATLAB_ERROR_IF_NOT_OK_WITH_CONTEXT(arrow::matlab::index::validateSliceOffset(matlab_offset), - context, "arrow:array:slice:NonPositiveOffset"); - + context, error::ARRAY_SLICE_NON_POSITIVE_OFFSET); // Note: MATLAB uses 1-based indexing, so subtract 1. const int64_t offset = matlab_offset - 1; const int64_t length = int64_t(length_mda[0]); - MATLAB_ERROR_IF_NOT_OK_WITH_CONTEXT(arrow::matlab::index::validateSliceLength(length), - context, "arrow:array:slice:NegativeLength"); + context, error::ARRAY_SLICE_NEGATIVE_LENGTH); auto sliced_array = array->Slice(offset, length); const auto type_id = static_cast(sliced_array->type_id()); MATLAB_ASSIGN_OR_ERROR_WITH_CONTEXT(auto sliced_array_proxy, array::proxy::wrap(sliced_array), - context, "arrow:array:FailedToCreateArrayProxy"); + context, error::ARRAY_SLICE_FAILED_TO_CREATE_ARRAY_PROXY); const auto proxy_id = libmexclass::proxy::ProxyManager::manageProxy(sliced_array_proxy); diff --git a/matlab/src/cpp/arrow/matlab/error/error.h b/matlab/src/cpp/arrow/matlab/error/error.h index 5aa8f05c8c3..e6be411b62a 100644 --- a/matlab/src/cpp/arrow/matlab/error/error.h +++ b/matlab/src/cpp/arrow/matlab/error/error.h @@ -206,4 +206,8 @@ namespace arrow::matlab::error { static const char* ARRAY_VALIDATE_MINIMAL_FAILED = "arrow:array:ValidateMinimalFailed"; static const char* ARRAY_VALIDATE_FULL_FAILED = "arrow:array:ValidateFullFailed"; static const char* ARRAY_VALIDATE_UNSUPPORTED_ENUM = "arrow:array:ValidateUnsupportedEnum"; + static const char* ARRAY_SLICE_NON_POSITIVE_OFFSET = "arrow:array:slice:NonPositiveOffset"; + static const char* ARRAY_SLICE_NEGATIVE_LENGTH = "arrow:array:slice:NegativeLength"; + static const char* ARRAY_SLICE_FAILED_TO_CREATE_ARRAY_PROXY = "arrow:array:slice:FailedToCreateArrayProxy"; + } From 00dc1a7e20682767d0955222e0ce50e557d680fb Mon Sep 17 00:00:00 2001 From: Sarah Gilmore Date: Wed, 8 Nov 2023 15:14:42 -0500 Subject: [PATCH 7/9] Add more unit tests for slice --- matlab/test/arrow/array/tSlice.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/matlab/test/arrow/array/tSlice.m b/matlab/test/arrow/array/tSlice.m index 49b16b1754b..7d115821775 100644 --- a/matlab/test/arrow/array/tSlice.m +++ b/matlab/test/arrow/array/tSlice.m @@ -97,5 +97,19 @@ function StructArray(testCase) expected.text(1) = missing; testCase.verifyEqual(toMATLAB(slice), expected); end + + function NonPositiveOffsetError(testCase) + array = arrow.array(1:10); + fcn = @() array.slice(int64(0), int64(2)); + testCase.verifyError(fcn, "arrow:array:slice:NonPositiveOffset"); + fcn = @() array.slice(int64(-1), int64(2)); + testCase.verifyError(fcn, "arrow:array:slice:NonPositiveOffset"); + end + + function NegativeLengthError(testCase) + array = arrow.array(1:10); + fcn = @() array.slice(int64(1), int64(-1)); + testCase.verifyError(fcn, "arrow:array:slice:NegativeLength"); + end end end \ No newline at end of file From ee58ae4da94d42c736b5ae416876f3517e71fdee Mon Sep 17 00:00:00 2001 From: Sarah Gilmore Date: Thu, 9 Nov 2023 10:09:13 -0500 Subject: [PATCH 8/9] Update test case comments --- matlab/test/arrow/array/tSlice.m | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/matlab/test/arrow/array/tSlice.m b/matlab/test/arrow/array/tSlice.m index 7d115821775..78787f4b4e4 100644 --- a/matlab/test/arrow/array/tSlice.m +++ b/matlab/test/arrow/array/tSlice.m @@ -19,6 +19,8 @@ methods(Test) function BooleanArray(testCase) + % Verify the slice method returns the expected array when + % called on a Boolean Array. boolArray = arrow.array([true true false true true false], Valid=[1 2 3 6]); slice = boolArray.slice(int64(2), int64(4)); testCase.verifyEqual(slice.NumElements, int64(4)); @@ -27,6 +29,8 @@ function BooleanArray(testCase) end function NumericArray(testCase) + % Verify the slice method returns the expected array when + % called on a Numeric Array. float64Array = arrow.array(1:10, Valid=[2 3 4 5 8 10]); slice = float64Array.slice(int64(4), int64(5)); testCase.verifyEqual(slice.NumElements, int64(5)); @@ -35,6 +39,8 @@ function NumericArray(testCase) end function DateArray(testCase) + % Verify the slice method returns the expected array when + % called on a Date Array. import arrow.array.Date32Array dates = datetime(2023, 11, 8:16); date32Array = Date32Array.fromMATLAB(dates, Valid=[4 5 6 9]); @@ -46,6 +52,8 @@ function DateArray(testCase) end function TimeArray(testCase) + % Verify the slice method returns the expected array when + % called on a Time Array. times = seconds(10:20); time64Array = arrow.array(times, Valid=[2 4 6 7 8 10]); slice = time64Array.slice(int64(5), int64(6)); @@ -56,6 +64,8 @@ function TimeArray(testCase) end function TimestampArray(testCase) + % Verify the slice method returns the expected array when + % called on a TimestampArray. dates = datetime(2023, 11, 8:16); date32Array = arrow.array(dates, Valid=[1 2 4 5 6 8]); slice = date32Array.slice(int64(5), int64(3)); @@ -66,6 +76,8 @@ function TimestampArray(testCase) end function StringArray(testCase) + % Verify the slice method returns the expected array when + % called on a StringArray. stringArray = arrow.array(["a" "b" "c" "d" "e" "f" "g"], Valid=[1 3 4 5 6]); slice = stringArray.slice(int64(2), int64(3)); testCase.verifyEqual(slice.NumElements, int64(3)); @@ -75,6 +87,8 @@ function StringArray(testCase) end function ListArray(testCase) + % Verify the slice method returns the expected array when + % called on a ListArray. cellArray = {missing, [1, 2, 3], missing, [4, NaN], [6, 7, 8], missing}; listArray = arrow.array(cellArray); slice = listArray.slice(int64(2), int64(4)); @@ -85,6 +99,8 @@ function ListArray(testCase) end function StructArray(testCase) + % Verify the slice method returns the expected array when + % called on a StructArray. numbers = [NaN; 2; 3; 4; 5; 6; 7; NaN; 9; 10]; text = ["a"; missing; "c"; "d"; "e"; missing; "g"; "h"; "i"; "j"]; t = table(numbers, text); @@ -99,6 +115,9 @@ function StructArray(testCase) end function NonPositiveOffsetError(testCase) + % Verify the slice method throws an error whose identifier is + % "arrow:array:slice:NonPositiveOffset" if given a non-positive + % value as the offset. array = arrow.array(1:10); fcn = @() array.slice(int64(0), int64(2)); testCase.verifyError(fcn, "arrow:array:slice:NonPositiveOffset"); @@ -107,6 +126,9 @@ function NonPositiveOffsetError(testCase) end function NegativeLengthError(testCase) + % Verify the slice method throws an error whose identifier is + % "arrow:array:slice:NegativeLength" if given a negative value + % as the length. array = arrow.array(1:10); fcn = @() array.slice(int64(1), int64(-1)); testCase.verifyError(fcn, "arrow:array:slice:NegativeLength"); From e21d47ec3b9492464544cbf941113f3fc1243590 Mon Sep 17 00:00:00 2001 From: Sarah Gilmore Date: Thu, 9 Nov 2023 10:10:26 -0500 Subject: [PATCH 9/9] Update help text for tSlice.m --- matlab/test/arrow/array/tSlice.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/matlab/test/arrow/array/tSlice.m b/matlab/test/arrow/array/tSlice.m index 78787f4b4e4..c99503371a4 100644 --- a/matlab/test/arrow/array/tSlice.m +++ b/matlab/test/arrow/array/tSlice.m @@ -1,4 +1,5 @@ -%TSLICE Unit tests for the slice method of arrow.array.Array +%TSLICE Unit tests verifying the behavior of arrow.array.Array's slice +%method. % Licensed to the Apache Software Foundation (ASF) under one or more % contributor license agreements. See the NOTICE file distributed with