This is an automated email from the ASF dual-hosted git repository.
kevingurney pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 32659a2d0e GH-36874: [MATLAB] Move type constructor functions from the
`arrow.type` package to `arrow` package (#36875)
32659a2d0e is described below
commit 32659a2d0e939bf853129f814fab9bcdec01a3bc
Author: sgilmore10 <[email protected]>
AuthorDate: Wed Jul 26 11:08:24 2023 -0400
GH-36874: [MATLAB] Move type constructor functions from the `arrow.type`
package to `arrow` package (#36875)
### Rationale for this change
When working on PR #36855, we realized it would be better to place all
recommended public/user-facing APIs in the top-level `arrow` package. That's
why we added the function `arrow.field` in the top-level `arrow` package
instead of under `arrow.type`, even though the `Field` class is within
`arrow.type` package.
### What changes are included in this PR?
1. Moved the type constructor functions (`arrow.type.int8()`,
`arrow.type.timestamp()`, etc) from the `arrow.type` package to the `arrow
package`.
**Example: Old Way to Create a `Timestamp` Object:**
```matlab
>> type = arrow.type.timestmap(TimeUnit="nanosecond");
```
**Example: New Way to Create a `Timestamp` Object:**
```matlab
>> type = arrow.timestmap(TimeUnit="nanosecond");
```
### Are these changes tested?
Changes are covered by existing tests.
### Are there any user-facing changes?
Yes.
NOTE: This is a breaking change, but the MATLAB interface is not yet stable.
* Closes: #36874
Authored-by: Sarah Gilmore <[email protected]>
Signed-off-by: Kevin Gurney <[email protected]>
---
matlab/src/matlab/+arrow/{+type => }/boolean.m | 0
matlab/src/matlab/+arrow/{+type => }/float32.m | 0
matlab/src/matlab/+arrow/{+type => }/float64.m | 0
matlab/src/matlab/+arrow/{+type => }/int16.m | 0
matlab/src/matlab/+arrow/{+type => }/int32.m | 0
matlab/src/matlab/+arrow/{+type => }/int64.m | 0
matlab/src/matlab/+arrow/{+type => }/int8.m | 0
matlab/src/matlab/+arrow/{+type => }/string.m | 0
matlab/src/matlab/+arrow/{+type => }/timestamp.m | 0
matlab/src/matlab/+arrow/{+type => }/uint16.m | 0
matlab/src/matlab/+arrow/{+type => }/uint32.m | 0
matlab/src/matlab/+arrow/{+type => }/uint64.m | 0
matlab/src/matlab/+arrow/{+type => }/uint8.m | 0
matlab/test/arrow/array/tBooleanArray.m | 2 +-
matlab/test/arrow/array/tFloat32Array.m | 2 +-
matlab/test/arrow/array/tFloat64Array.m | 2 +-
matlab/test/arrow/array/tInt16Array.m | 2 +-
matlab/test/arrow/array/tInt32Array.m | 2 +-
matlab/test/arrow/array/tInt64Array.m | 2 +-
matlab/test/arrow/array/tInt8Array.m | 2 +-
matlab/test/arrow/array/tStringArray.m | 2 +-
matlab/test/arrow/array/tUInt16Array.m | 2 +-
matlab/test/arrow/array/tUInt32Array.m | 2 +-
matlab/test/arrow/array/tUInt64Array.m | 2 +-
matlab/test/arrow/array/tUInt8Array.m | 2 +-
matlab/test/arrow/type/tBooleanType.m | 2 +-
matlab/test/arrow/type/tField.m | 44 ++++++++++++------------
matlab/test/arrow/type/tFloat32Type.m | 2 +-
matlab/test/arrow/type/tFloat64Type.m | 2 +-
matlab/test/arrow/type/tInt16Type.m | 2 +-
matlab/test/arrow/type/tInt32Type.m | 2 +-
matlab/test/arrow/type/tInt64Type.m | 2 +-
matlab/test/arrow/type/tInt8Type.m | 2 +-
matlab/test/arrow/type/tStringType.m | 4 +--
matlab/test/arrow/type/tTimestampType.m | 24 ++++++-------
matlab/test/arrow/type/tUInt16Type.m | 2 +-
matlab/test/arrow/type/tUInt32Type.m | 2 +-
matlab/test/arrow/type/tUInt64Type.m | 2 +-
matlab/test/arrow/type/tUInt8Type.m | 2 +-
39 files changed, 59 insertions(+), 59 deletions(-)
diff --git a/matlab/src/matlab/+arrow/+type/boolean.m
b/matlab/src/matlab/+arrow/boolean.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/boolean.m
rename to matlab/src/matlab/+arrow/boolean.m
diff --git a/matlab/src/matlab/+arrow/+type/float32.m
b/matlab/src/matlab/+arrow/float32.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/float32.m
rename to matlab/src/matlab/+arrow/float32.m
diff --git a/matlab/src/matlab/+arrow/+type/float64.m
b/matlab/src/matlab/+arrow/float64.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/float64.m
rename to matlab/src/matlab/+arrow/float64.m
diff --git a/matlab/src/matlab/+arrow/+type/int16.m
b/matlab/src/matlab/+arrow/int16.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/int16.m
rename to matlab/src/matlab/+arrow/int16.m
diff --git a/matlab/src/matlab/+arrow/+type/int32.m
b/matlab/src/matlab/+arrow/int32.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/int32.m
rename to matlab/src/matlab/+arrow/int32.m
diff --git a/matlab/src/matlab/+arrow/+type/int64.m
b/matlab/src/matlab/+arrow/int64.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/int64.m
rename to matlab/src/matlab/+arrow/int64.m
diff --git a/matlab/src/matlab/+arrow/+type/int8.m
b/matlab/src/matlab/+arrow/int8.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/int8.m
rename to matlab/src/matlab/+arrow/int8.m
diff --git a/matlab/src/matlab/+arrow/+type/string.m
b/matlab/src/matlab/+arrow/string.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/string.m
rename to matlab/src/matlab/+arrow/string.m
diff --git a/matlab/src/matlab/+arrow/+type/timestamp.m
b/matlab/src/matlab/+arrow/timestamp.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/timestamp.m
rename to matlab/src/matlab/+arrow/timestamp.m
diff --git a/matlab/src/matlab/+arrow/+type/uint16.m
b/matlab/src/matlab/+arrow/uint16.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/uint16.m
rename to matlab/src/matlab/+arrow/uint16.m
diff --git a/matlab/src/matlab/+arrow/+type/uint32.m
b/matlab/src/matlab/+arrow/uint32.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/uint32.m
rename to matlab/src/matlab/+arrow/uint32.m
diff --git a/matlab/src/matlab/+arrow/+type/uint64.m
b/matlab/src/matlab/+arrow/uint64.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/uint64.m
rename to matlab/src/matlab/+arrow/uint64.m
diff --git a/matlab/src/matlab/+arrow/+type/uint8.m
b/matlab/src/matlab/+arrow/uint8.m
similarity index 100%
rename from matlab/src/matlab/+arrow/+type/uint8.m
rename to matlab/src/matlab/+arrow/uint8.m
diff --git a/matlab/test/arrow/array/tBooleanArray.m
b/matlab/test/arrow/array/tBooleanArray.m
index ad6126b77f..e27ca11285 100644
--- a/matlab/test/arrow/array/tBooleanArray.m
+++ b/matlab/test/arrow/array/tBooleanArray.m
@@ -22,7 +22,7 @@ classdef tBooleanArray < matlab.unittest.TestCase
MatlabArrayFcn = @logical
MatlabConversionFcn = @logical
NullSubstitutionValue = false
- ArrowType = arrow.type.boolean
+ ArrowType = arrow.boolean
end
methods(TestClassSetup)
diff --git a/matlab/test/arrow/array/tFloat32Array.m
b/matlab/test/arrow/array/tFloat32Array.m
index e8655c7781..f007e2b422 100644
--- a/matlab/test/arrow/array/tFloat32Array.m
+++ b/matlab/test/arrow/array/tFloat32Array.m
@@ -24,7 +24,7 @@ classdef tFloat32Array < hNumericArray
MaxValue = realmax("single")
MinValue = realmin("single")
NullSubstitutionValue = single(NaN)
- ArrowType = arrow.type.float32
+ ArrowType = arrow.float32
end
methods(Test)
diff --git a/matlab/test/arrow/array/tFloat64Array.m
b/matlab/test/arrow/array/tFloat64Array.m
index a01eef7388..9b30ec8f25 100755
--- a/matlab/test/arrow/array/tFloat64Array.m
+++ b/matlab/test/arrow/array/tFloat64Array.m
@@ -24,7 +24,7 @@ classdef tFloat64Array < hNumericArray
MaxValue = realmax("double")
MinValue = realmin("double")
NullSubstitutionValue = NaN
- ArrowType = arrow.type.float64
+ ArrowType = arrow.float64
end
methods(Test)
diff --git a/matlab/test/arrow/array/tInt16Array.m
b/matlab/test/arrow/array/tInt16Array.m
index 466dfaf9c4..9cb5fdc1d1 100644
--- a/matlab/test/arrow/array/tInt16Array.m
+++ b/matlab/test/arrow/array/tInt16Array.m
@@ -24,7 +24,7 @@ classdef tInt16Array < hNumericArray
MaxValue = intmax("int16")
MinValue = intmin("int16")
NullSubstitutionValue = int16(0)
- ArrowType = arrow.type.int16
+ ArrowType = arrow.int16
end
end
diff --git a/matlab/test/arrow/array/tInt32Array.m
b/matlab/test/arrow/array/tInt32Array.m
index b8334e97cc..b45705592d 100644
--- a/matlab/test/arrow/array/tInt32Array.m
+++ b/matlab/test/arrow/array/tInt32Array.m
@@ -24,6 +24,6 @@ classdef tInt32Array < hNumericArray
MaxValue = intmax("int32")
MinValue = intmin("int32")
NullSubstitutionValue = int32(0)
- ArrowType = arrow.type.int32
+ ArrowType = arrow.int32
end
end
diff --git a/matlab/test/arrow/array/tInt64Array.m
b/matlab/test/arrow/array/tInt64Array.m
index a877cb2564..0b38f58547 100644
--- a/matlab/test/arrow/array/tInt64Array.m
+++ b/matlab/test/arrow/array/tInt64Array.m
@@ -24,6 +24,6 @@ classdef tInt64Array < hNumericArray
MaxValue = intmax("int64")
MinValue = intmin("int64")
NullSubstitutionValue = int64(0)
- ArrowType = arrow.type.int64
+ ArrowType = arrow.int64
end
end
diff --git a/matlab/test/arrow/array/tInt8Array.m
b/matlab/test/arrow/array/tInt8Array.m
index dbd6e74ea7..8ce8e4e9b2 100644
--- a/matlab/test/arrow/array/tInt8Array.m
+++ b/matlab/test/arrow/array/tInt8Array.m
@@ -24,7 +24,7 @@ classdef tInt8Array < hNumericArray
MaxValue = intmax("int8")
MinValue = intmin("int8")
NullSubstitutionValue = int8(0)
- ArrowType = arrow.type.int8
+ ArrowType = arrow.int8
end
end
diff --git a/matlab/test/arrow/array/tStringArray.m
b/matlab/test/arrow/array/tStringArray.m
index 792d759981..dbb2adca0c 100644
--- a/matlab/test/arrow/array/tStringArray.m
+++ b/matlab/test/arrow/array/tStringArray.m
@@ -22,7 +22,7 @@ classdef tStringArray < matlab.unittest.TestCase
MatlabArrayFcn = @string
MatlabConversionFcn = @string
NullSubstitutionValue = string(missing)
- ArrowType = arrow.type.string
+ ArrowType = arrow.string
end
methods(TestClassSetup)
diff --git a/matlab/test/arrow/array/tUInt16Array.m
b/matlab/test/arrow/array/tUInt16Array.m
index eed53c7882..705d6eabc0 100644
--- a/matlab/test/arrow/array/tUInt16Array.m
+++ b/matlab/test/arrow/array/tUInt16Array.m
@@ -24,6 +24,6 @@ classdef tUInt16Array < hNumericArray
MaxValue = intmax("uint16")
MinValue = intmin("uint16")
NullSubstitutionValue = uint16(0)
- ArrowType = arrow.type.uint16
+ ArrowType = arrow.uint16
end
end
diff --git a/matlab/test/arrow/array/tUInt32Array.m
b/matlab/test/arrow/array/tUInt32Array.m
index b5e1970cbc..267a687738 100644
--- a/matlab/test/arrow/array/tUInt32Array.m
+++ b/matlab/test/arrow/array/tUInt32Array.m
@@ -24,6 +24,6 @@ classdef tUInt32Array < hNumericArray
MaxValue = intmax("uint32")
MinValue = intmin("uint32")
NullSubstitutionValue = uint32(0)
- ArrowType = arrow.type.uint32
+ ArrowType = arrow.uint32
end
end
diff --git a/matlab/test/arrow/array/tUInt64Array.m
b/matlab/test/arrow/array/tUInt64Array.m
index 6cd2c9cba6..b1a23a004d 100644
--- a/matlab/test/arrow/array/tUInt64Array.m
+++ b/matlab/test/arrow/array/tUInt64Array.m
@@ -24,6 +24,6 @@ classdef tUInt64Array < hNumericArray
MaxValue = intmax("uint64")
MinValue = intmin("uint64")
NullSubstitutionValue = uint64(0)
- ArrowType = arrow.type.uint64
+ ArrowType = arrow.uint64
end
end
diff --git a/matlab/test/arrow/array/tUInt8Array.m
b/matlab/test/arrow/array/tUInt8Array.m
index 68365958bc..3db79f8c0b 100644
--- a/matlab/test/arrow/array/tUInt8Array.m
+++ b/matlab/test/arrow/array/tUInt8Array.m
@@ -24,6 +24,6 @@ classdef tUInt8Array < hNumericArray
MaxValue = intmax("uint8")
MinValue = intmin("uint8")
NullSubstitutionValue = uint8(0)
- ArrowType = arrow.type.uint8
+ ArrowType = arrow.uint8
end
end
diff --git a/matlab/test/arrow/type/tBooleanType.m
b/matlab/test/arrow/type/tBooleanType.m
index 94de09a3e5..eaa1c280d5 100644
--- a/matlab/test/arrow/type/tBooleanType.m
+++ b/matlab/test/arrow/type/tBooleanType.m
@@ -17,7 +17,7 @@ classdef tBooleanType < hFixedWidthType
% Test class for arrow.type.BooleanType
properties
- ArrowType = arrow.type.boolean
+ ArrowType = arrow.boolean
TypeID = arrow.type.ID.Boolean
BitWidth = int32(1)
ClassName = "arrow.type.BooleanType"
diff --git a/matlab/test/arrow/type/tField.m b/matlab/test/arrow/type/tField.m
index 9f0a885159..77a05bbe39 100644
--- a/matlab/test/arrow/type/tField.m
+++ b/matlab/test/arrow/type/tField.m
@@ -19,7 +19,7 @@ classdef tField < matlab.unittest.TestCase
methods(Test)
function TestBasic(testCase)
name = "A";
- type = arrow.type.uint64;
+ type = arrow.uint64;
field = arrow.field(name, type);
testCase.verifyEqual(field.Name, name);
@@ -29,19 +29,19 @@ classdef tField < matlab.unittest.TestCase
function TestSupportedTypes(testCase)
name = "name";
supportedTypes = { ...
- arrow.type.uint8, ...
- arrow.type.uint16, ...
- arrow.type.uint32, ...
- arrow.type.uint64, ...
- arrow.type.int8, ...
- arrow.type.int16, ...
- arrow.type.int32, ...
- arrow.type.int64, ...
- arrow.type.boolean, ...
- arrow.type.float32, ...
- arrow.type.float64, ...
- arrow.type.string, ...
- arrow.type.timestamp, ...
+ arrow.uint8, ...
+ arrow.uint16, ...
+ arrow.uint32, ...
+ arrow.uint64, ...
+ arrow.int8, ...
+ arrow.int16, ...
+ arrow.int32, ...
+ arrow.int64, ...
+ arrow.boolean, ...
+ arrow.float32, ...
+ arrow.float64, ...
+ arrow.string, ...
+ arrow.timestamp, ...
};
for ii = 1:numel(supportedTypes)
supportedType = supportedTypes{ii};
@@ -56,7 +56,7 @@ classdef tField < matlab.unittest.TestCase
tree = "🌲";
mango = "ðŸ¥";
- type = arrow.type.uint64;
+ type = arrow.uint64;
field = arrow.field(smiley, type);
testCase.verifyEqual(field.Name, smiley);
@@ -75,13 +75,13 @@ classdef tField < matlab.unittest.TestCase
function TestErrorIfNameStringMissing(testCase)
name = string(missing);
- type = arrow.type.uint64;
+ type = arrow.uint64;
testCase.verifyError(@() arrow.field(name, type),
"MATLAB:validators:mustBeNonmissing");
end
function TestNameEmptyString(testCase)
name = "";
- type = arrow.type.uint64;
+ type = arrow.uint64;
field = arrow.field(name, type);
testCase.verifyEqual(field.Name, name);
@@ -90,7 +90,7 @@ classdef tField < matlab.unittest.TestCase
function TestNameCharVector(testCase)
name = 'ABC';
- type = arrow.type.uint64;
+ type = arrow.uint64;
field = arrow.field(name, type);
testCase.verifyEqual(field.Name, string(name));
@@ -99,7 +99,7 @@ classdef tField < matlab.unittest.TestCase
function TestNameNumber(testCase)
name = 123;
- type = arrow.type.uint64;
+ type = arrow.uint64;
field = arrow.field(name, type);
testCase.verifyEqual(field.Name, string(123));
@@ -114,17 +114,17 @@ classdef tField < matlab.unittest.TestCase
function TestNameUnsupportedInput(testCase)
name = table();
- type = arrow.type.uint64;
+ type = arrow.uint64;
testCase.verifyError(@() arrow.field(name, type),
"MATLAB:validation:UnableToConvert");
end
function TestImmutableProperties(testCase)
name = "A";
- type = arrow.type.uint64;
+ type = arrow.uint64;
field = arrow.field(name, type);
testCase.verifyError(@() setfield(field, "Name", "NewValue"),
"MATLAB:class:noSetMethod")
- testCase.verifyError(@() setfield(field, "Type",
arrow.type.boolean), "MATLAB:class:noSetMethod")
+ testCase.verifyError(@() setfield(field, "Type", arrow.boolean),
"MATLAB:class:noSetMethod")
end
end
diff --git a/matlab/test/arrow/type/tFloat32Type.m
b/matlab/test/arrow/type/tFloat32Type.m
index c54fcfd328..1837c39a72 100644
--- a/matlab/test/arrow/type/tFloat32Type.m
+++ b/matlab/test/arrow/type/tFloat32Type.m
@@ -17,7 +17,7 @@ classdef tFloat32Type < hFixedWidthType
% Test class for arrow.type.Float32Type
properties
- ArrowType = arrow.type.float32
+ ArrowType = arrow.float32
TypeID = arrow.type.ID.Float32
BitWidth = int32(32)
ClassName = "arrow.type.Float32Type"
diff --git a/matlab/test/arrow/type/tFloat64Type.m
b/matlab/test/arrow/type/tFloat64Type.m
index 6b5648dfc1..8387a4bf58 100644
--- a/matlab/test/arrow/type/tFloat64Type.m
+++ b/matlab/test/arrow/type/tFloat64Type.m
@@ -17,7 +17,7 @@ classdef tFloat64Type < hFixedWidthType
% Test class for arrow.type.Float64Type
properties
- ArrowType = arrow.type.float64
+ ArrowType = arrow.float64
TypeID = arrow.type.ID.Float64
BitWidth = int32(64)
ClassName = "arrow.type.Float64Type"
diff --git a/matlab/test/arrow/type/tInt16Type.m
b/matlab/test/arrow/type/tInt16Type.m
index a929ba688b..9b741a3295 100644
--- a/matlab/test/arrow/type/tInt16Type.m
+++ b/matlab/test/arrow/type/tInt16Type.m
@@ -17,7 +17,7 @@ classdef tInt16Type < hFixedWidthType
% Test class for arrow.type.Int16Type
properties
- ArrowType = arrow.type.int16
+ ArrowType = arrow.int16
TypeID = arrow.type.ID.Int16
BitWidth = int32(16)
ClassName = "arrow.type.Int16Type"
diff --git a/matlab/test/arrow/type/tInt32Type.m
b/matlab/test/arrow/type/tInt32Type.m
index 6d59b5454e..9724f9a4a6 100644
--- a/matlab/test/arrow/type/tInt32Type.m
+++ b/matlab/test/arrow/type/tInt32Type.m
@@ -17,7 +17,7 @@ classdef tInt32Type < hFixedWidthType
% Test class for arrow.type.Int32Type
properties
- ArrowType = arrow.type.int32
+ ArrowType = arrow.int32
TypeID = arrow.type.ID.Int32
BitWidth = int32(32)
ClassName = "arrow.type.Int32Type"
diff --git a/matlab/test/arrow/type/tInt64Type.m
b/matlab/test/arrow/type/tInt64Type.m
index 6ff0d2b07c..2acb5fd2d3 100644
--- a/matlab/test/arrow/type/tInt64Type.m
+++ b/matlab/test/arrow/type/tInt64Type.m
@@ -17,7 +17,7 @@ classdef tInt64Type < hFixedWidthType
% Test class for arrow.type.Int64Type
properties
- ArrowType = arrow.type.int64
+ ArrowType = arrow.int64
TypeID = arrow.type.ID.Int64
BitWidth = int32(64)
ClassName = "arrow.type.Int64Type"
diff --git a/matlab/test/arrow/type/tInt8Type.m
b/matlab/test/arrow/type/tInt8Type.m
index 396be3a3f7..15e2629bc4 100644
--- a/matlab/test/arrow/type/tInt8Type.m
+++ b/matlab/test/arrow/type/tInt8Type.m
@@ -17,7 +17,7 @@ classdef tInt8Type < hFixedWidthType
% Test class for arrow.type.Int8Type
properties
- ArrowType = arrow.type.int8
+ ArrowType = arrow.int8
TypeID = arrow.type.ID.Int8
BitWidth = int32(8)
ClassName = "arrow.type.Int8Type"
diff --git a/matlab/test/arrow/type/tStringType.m
b/matlab/test/arrow/type/tStringType.m
index 057ffd5426..e52c2cb1cb 100644
--- a/matlab/test/arrow/type/tStringType.m
+++ b/matlab/test/arrow/type/tStringType.m
@@ -19,14 +19,14 @@ classdef tStringType < matlab.unittest.TestCase
methods (Test)
function Basic(tc)
- type = arrow.type.string;
+ type = arrow.string;
className = string(class(type));
tc.verifyEqual(className, "arrow.type.StringType");
tc.verifyEqual(type.ID, arrow.type.ID.String);
end
function NumFields(tc)
- type = arrow.type.string;
+ type = arrow.string;
tc.verifyEqual(type.NumFields, int32(0));
end
diff --git a/matlab/test/arrow/type/tTimestampType.m
b/matlab/test/arrow/type/tTimestampType.m
index fa893d2d93..8fd78854ac 100644
--- a/matlab/test/arrow/type/tTimestampType.m
+++ b/matlab/test/arrow/type/tTimestampType.m
@@ -17,7 +17,7 @@ classdef tTimestampType < hFixedWidthType
% Test class for arrow.type.TimestampType
properties
- ArrowType = arrow.type.timestamp
+ ArrowType = arrow.timestamp
TypeID = arrow.type.ID.Timestamp
BitWidth = int32(64)
ClassName = "arrow.type.TimestampType"
@@ -32,7 +32,7 @@ classdef tTimestampType < hFixedWidthType
function DefaultTimeUnit(testCase)
% Verify the default TimeUnit is Microsecond
- type = arrow.type.timestamp;
+ type = arrow.timestamp;
actualUnit = type.TimeUnit;
expectedUnit = arrow.type.TimeUnit.Microsecond;
testCase.verifyEqual(actualUnit, expectedUnit);
@@ -40,7 +40,7 @@ classdef tTimestampType < hFixedWidthType
function DefaultTimeZone(testCase)
% Verify the default TimeZone is ""
- type = arrow.type.timestamp;
+ type = arrow.timestamp;
actualTimezone = type.TimeZone;
expectedTimezone = "";
testCase.verifyEqual(actualTimezone, expectedTimezone);
@@ -53,7 +53,7 @@ classdef tTimestampType < hFixedWidthType
TimeUnit.Microsecond, TimeUnit.Nanosecond];
for unit = expectedUnit
- type = timestamp(TimeUnit=unit);
+ type = arrow.timestamp(TimeUnit=unit);
testCase.verifyEqual(type.TimeUnit, unit);
end
end
@@ -67,42 +67,42 @@ classdef tTimestampType < hFixedWidthType
TimeUnit.Microsecond, TimeUnit.Nanosecond];
for ii = 1:numel(unitString)
- type = timestamp(TimeUnit=unitString(ii));
+ type = arrow.timestamp(TimeUnit=unitString(ii));
testCase.verifyEqual(type.TimeUnit, expectedUnit(ii));
end
end
function SupplyTimeZone(testCase)
% Supply the TimeZone.
- type = arrow.type.timestamp(TimeZone="America/New_York");
+ type = arrow.timestamp(TimeZone="America/New_York");
testCase.verifyEqual(type.TimeZone, "America/New_York");
end
function ErrorIfMissingStringTimeZone(testCase)
- fcn = @() arrow.type.timestamp(TimeZone=string(missing));
+ fcn = @() arrow.timestamp(TimeZone=string(missing));
testCase.verifyError(fcn, "MATLAB:validators:mustBeNonmissing");
end
function ErrorIfTimeZoneIsNonScalar(testCase)
- fcn = @() arrow.type.timestamp(TimeZone=["a", "b"]);
+ fcn = @() arrow.timestamp(TimeZone=["a", "b"]);
testCase.verifyError(fcn, "MATLAB:validation:IncompatibleSize");
- fcn = @() arrow.type.timestamp(TimeZone=strings(0, 0));
+ fcn = @() arrow.timestamp(TimeZone=strings(0, 0));
testCase.verifyError(fcn, "MATLAB:validation:IncompatibleSize");
end
function ErrorIfAmbiguousTimeUnit(testCase)
- fcn = @() arrow.type.timestamp(TimeUnit="mi");
+ fcn = @() arrow.timestamp(TimeUnit="mi");
testCase.verifyError(fcn, "MATLAB:validation:UnableToConvert");
end
function ErrorIfTimeUnitIsNonScalar(testCase)
units = [arrow.type.TimeUnit.Second;
arrow.type.TimeUnit.Millisecond];
- fcn = @() arrow.type.timestamp(TimeZone=units);
+ fcn = @() arrow.timestamp(TimeZone=units);
testCase.verifyError(fcn, "MATLAB:validation:IncompatibleSize");
units = ["second" "millisecond"];
- fcn = @() arrow.type.timestamp(TimeZone=units);
+ fcn = @() arrow.timestamp(TimeZone=units);
testCase.verifyError(fcn, "MATLAB:validation:IncompatibleSize");
end
end
diff --git a/matlab/test/arrow/type/tUInt16Type.m
b/matlab/test/arrow/type/tUInt16Type.m
index ede66f6324..8a803dc0a7 100644
--- a/matlab/test/arrow/type/tUInt16Type.m
+++ b/matlab/test/arrow/type/tUInt16Type.m
@@ -17,7 +17,7 @@ classdef tUInt16Type < hFixedWidthType
% Test class for arrow.type.UInt16Type
properties
- ArrowType = arrow.type.uint16
+ ArrowType = arrow.uint16
TypeID = arrow.type.ID.UInt16
BitWidth = int32(16)
ClassName = "arrow.type.UInt16Type"
diff --git a/matlab/test/arrow/type/tUInt32Type.m
b/matlab/test/arrow/type/tUInt32Type.m
index def24c76ce..019b8ce269 100644
--- a/matlab/test/arrow/type/tUInt32Type.m
+++ b/matlab/test/arrow/type/tUInt32Type.m
@@ -17,7 +17,7 @@ classdef tUInt32Type < hFixedWidthType
% Test class for arrow.type.UInt32Type
properties
- ArrowType = arrow.type.uint32
+ ArrowType = arrow.uint32
TypeID = arrow.type.ID.UInt32
BitWidth = int32(32)
ClassName = "arrow.type.UInt32Type"
diff --git a/matlab/test/arrow/type/tUInt64Type.m
b/matlab/test/arrow/type/tUInt64Type.m
index 9228e1cc50..8287bb40d0 100644
--- a/matlab/test/arrow/type/tUInt64Type.m
+++ b/matlab/test/arrow/type/tUInt64Type.m
@@ -17,7 +17,7 @@ classdef tUInt64Type < hFixedWidthType
% Test class for arrow.type.UInt64Type
properties
- ArrowType = arrow.type.uint64
+ ArrowType = arrow.uint64
TypeID = arrow.type.ID.UInt64
BitWidth = int32(64)
ClassName = "arrow.type.UInt64Type"
diff --git a/matlab/test/arrow/type/tUInt8Type.m
b/matlab/test/arrow/type/tUInt8Type.m
index eec3aa5fde..1ff203c862 100644
--- a/matlab/test/arrow/type/tUInt8Type.m
+++ b/matlab/test/arrow/type/tUInt8Type.m
@@ -17,7 +17,7 @@ classdef tUInt8Type < hFixedWidthType
% Test class for arrow.type.UInt64Type
properties
- ArrowType = arrow.type.uint8
+ ArrowType = arrow.uint8
TypeID = arrow.type.ID.UInt8
BitWidth = int32(8)
ClassName = "arrow.type.UInt8Type"