From 10becf47044aae524331530a1114d9f392063858 Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Fri, 25 Aug 2023 13:38:47 -0400 Subject: [PATCH] Cast duration to int32 before passing to C++. --- matlab/src/matlab/+arrow/+array/Date32Array.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/src/matlab/+arrow/+array/Date32Array.m b/matlab/src/matlab/+arrow/+array/Date32Array.m index 1b368edbeae67..8b40af4dd9656 100644 --- a/matlab/src/matlab/+arrow/+array/Date32Array.m +++ b/matlab/src/matlab/+arrow/+array/Date32Array.m @@ -74,7 +74,7 @@ validElements = arrow.internal.validate.parseValidElements(data, opts); % UNIX Epoch (January 1st, 1970) unixEpoch = datetime(0, ConvertFrom="posixtime"); - numDays = days(data - unixEpoch); + numDays = int32(days(data - unixEpoch)); args = struct(MatlabArray=numDays, Valid=validElements); proxy = arrow.internal.proxy.create("arrow.array.proxy.Date32Array", args); array = Date32Array(proxy);