diff --git a/matlab/src/matlab/+arrow/+internal/+test/+tabular/createAllSupportedArrayTypes.m b/matlab/src/matlab/+arrow/+internal/+test/+tabular/createAllSupportedArrayTypes.m index 15ee0589d56e4..4ffe921449ba4 100644 --- a/matlab/src/matlab/+arrow/+internal/+test/+tabular/createAllSupportedArrayTypes.m +++ b/matlab/src/matlab/+arrow/+internal/+test/+tabular/createAllSupportedArrayTypes.m @@ -32,6 +32,7 @@ matlabData = cell(numClasses, 1); timeClasses = getTimeArrayClasses(); + dateClasses = getDateArrayClasses(); numericArrayToMatlabTypeDict = getNumericArrayToMatlabDictionary(); for ii = 1:numel(classes) @@ -54,6 +55,10 @@ matlabData{ii} = randomDurations(opts.NumRows); cmd = compose("%s.fromMATLAB(matlabData{ii})", name); arrowArrays{ii} = eval(cmd); + elseif ismember(name, dateClasses) + matlabData{ii} = randomDatetimes(opts.NumRows); + cmd = compose("%s.fromMATLAB(matlabData{ii})", name); + arrowArrays{ii} = eval(cmd); else error("arrow:test:SupportedArrayCase", ... "Missing if-branch for array class " + name); @@ -86,6 +91,10 @@ timeClasses = compose("arrow.array.Time%dArray", [32 64]); end +function timeClasses = getDateArrayClasses() + timeClasses = compose("arrow.array.Date%dArray", 32); +end + function number = randomNumbers(numberType, numElements) number = cast(randi(255, [numElements 1]), numberType); end