forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Array Type property from proxy id
- Loading branch information
1 parent
fdf34ce
commit bb84776
Showing
28 changed files
with
171 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,10 +33,10 @@ | |
end | ||
arrow.args.validateTypeAndShape(data, "logical"); | ||
validElements = arrow.args.parseValidElements(data, opts); | ||
type = arrow.type.BooleanType; | ||
opts = struct(MatlabArray=data, Valid=validElements, TypeProxyID=type.Proxy.ID); | ||
opts = struct(MatlabArray=data, Valid=validElements); | ||
[email protected]("Name", "arrow.array.proxy.BooleanArray", "ConstructorArguments", {opts}); | ||
obj.Type = type; | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.BooleanType(typeProxyID); | ||
end | ||
|
||
function data = logical(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,10 @@ | |
|
||
methods | ||
function obj = Float32Array(data, varargin) | ||
type = arrow.type.Float32Type; | ||
[email protected](data, "single", ... | ||
"arrow.array.proxy.Float32Array", type.Proxy.ID, varargin{:}); | ||
obj.Type = type; | ||
"arrow.array.proxy.Float32Array", varargin{:}); | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.Float32Type(typeProxyID); | ||
end | ||
|
||
function data = single(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,8 @@ | |
function obj = Float64Array(data, varargin) | ||
[email protected](data, "double", ... | ||
"arrow.array.proxy.Float64Array", varargin{:}); | ||
type_proxy_id = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.Float64Type(type_proxy_id); | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.Float64Type(typeProxyID); | ||
end | ||
|
||
function data = double(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,10 @@ | |
|
||
methods | ||
function obj = Int16Array(data, varargin) | ||
type = arrow.type.Int16Type; | ||
[email protected](data, "int16", ... | ||
"arrow.array.proxy.Int16Array", type.Proxy.ID, varargin{:}); | ||
obj.Type = type; | ||
"arrow.array.proxy.Int16Array", varargin{:}); | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.Int16Type(typeProxyID); | ||
end | ||
|
||
function data = int16(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,10 @@ | |
|
||
methods | ||
function obj = Int32Array(data, varargin) | ||
type = arrow.type.Int32Type; | ||
[email protected](data, "int32", ... | ||
"arrow.array.proxy.Int32Array", type.Proxy.ID, varargin{:}); | ||
obj.Type = type; | ||
"arrow.array.proxy.Int32Array", varargin{:}); | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.Int32Type(typeProxyID); | ||
end | ||
|
||
function data = int32(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,10 @@ | |
|
||
methods | ||
function obj = Int64Array(data, varargin) | ||
type = arrow.type.Int64Type; | ||
[email protected](data, "int64", ... | ||
"arrow.array.proxy.Int64Array", type.Proxy.ID, varargin{:}); | ||
obj.Type = type; | ||
"arrow.array.proxy.Int64Array", varargin{:}); | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.Int64Type(typeProxyID); | ||
end | ||
|
||
function data = int64(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,10 @@ | |
|
||
methods | ||
function obj = Int8Array(data, varargin) | ||
type = arrow.type.Int8Type; | ||
[email protected](data, "int8", type.Proxy.ID, ... | ||
[email protected](data, "int8", ... | ||
"arrow.array.proxy.Int8Array", varargin{:}); | ||
obj.Type = type; | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.Int8Type(typeProxyID); | ||
end | ||
|
||
function data = int8(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,9 @@ | |
|
||
args = struct(MatlabArray=ptime, Valid=validElements, TimeZone=timezone, TimeUnit=string(opts.TimeUnit)); | ||
[email protected]("Name", "arrow.array.proxy.TimestampArray", "ConstructorArguments", {args}); | ||
obj.Type = arrow.type.TimestampType(TimeUnit=opts.TimeUnit, TimeZone=timezone); | ||
|
||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.TimestampType(typeProxyID); | ||
end | ||
|
||
function dates = toMATLAB(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,10 @@ | |
|
||
methods | ||
function obj = UInt16Array(data, varargin) | ||
type = arrow.type.UInt16Type; | ||
[email protected](data, "uint16", ... | ||
"arrow.array.proxy.UInt16Array", type.Proxy.ID, varargin{:}); | ||
obj.Type = type; | ||
"arrow.array.proxy.UInt16Array", varargin{:}); | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.UInt16Type(typeProxyID); | ||
end | ||
|
||
function data = uint16(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,10 @@ | |
|
||
methods | ||
function obj = UInt32Array(data, varargin) | ||
type = arrow.type.UInt32Type; | ||
[email protected](data, "uint32", ... | ||
"arrow.array.proxy.UInt32Array", type.Proxy.ID, varargin{:}); | ||
obj.Type = type; | ||
"arrow.array.proxy.UInt32Array", varargin{:}); | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.UInt32Type(typeProxyID); | ||
end | ||
|
||
function data = uint32(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,10 @@ | |
|
||
methods | ||
function obj = UInt64Array(data, varargin) | ||
type = arrow.type.UInt64Type; | ||
[email protected](data, "uint64", ... | ||
"arrow.array.proxy.UInt64Array", type.Proxy.ID, varargin{:}); | ||
obj.Type = type; | ||
"arrow.array.proxy.UInt64Array", varargin{:}); | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.UInt64Type(typeProxyID); | ||
end | ||
|
||
function data = uint64(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,10 +26,10 @@ | |
|
||
methods | ||
function obj = UInt8Array(data, varargin) | ||
type = arrow.type.UInt8Type; | ||
[email protected](data, "uint8", ... | ||
"arrow.array.proxy.UInt8Array", type.Proxy.ID, varargin{:}); | ||
obj.Type = type; | ||
"arrow.array.proxy.UInt8Array", varargin{:}); | ||
typeProxyID = obj.Proxy.createDataTypeProxy(); | ||
obj.Type = arrow.type.UInt8Type(typeProxyID); | ||
end | ||
|
||
function data = uint8(obj) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,13 @@ | |
%BOOLEANTYPE Type class for boolean data. | ||
|
||
methods | ||
function obj = BooleanType() | ||
[email protected]("Name", "arrow.type.proxy.BooleanType", "ConstructorArguments", {}) | ||
function obj = BooleanType(proxyID) | ||
arguments | ||
proxyID = missing | ||
end | ||
proxyName = "arrow.type.proxy.BooleanType"; | ||
args = arrow.type.parseProxyArguments(proxyName, proxyID); | ||
[email protected](args{:}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,13 @@ | |
%FLOAT32TYPE Type class for float32 data. | ||
|
||
methods | ||
function obj = Float32Type() | ||
[email protected]("Name", "arrow.type.proxy.Float32Type", "ConstructorArguments", {}) | ||
function obj = Float32Type(proxyID) | ||
arguments | ||
proxyID = missing | ||
end | ||
proxyName = "arrow.type.proxy.Float32Type"; | ||
args = arrow.type.parseProxyArguments(proxyName, proxyID); | ||
[email protected](args{:}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,15 +17,12 @@ | |
%FLOAT64Type Type class for float64 data. | ||
|
||
methods | ||
function obj = Float64Type(ID) | ||
function obj = Float64Type(proxyID) | ||
arguments | ||
ID = missing | ||
end | ||
if ismissing(ID) | ||
args = {"Name", "arrow.type.proxy.Float64Type", "ConstructorArguments", {}}; | ||
else | ||
args = {"Name", "arrow.type.proxy.Float64Type", "ID", ID}; | ||
proxyID = missing | ||
end | ||
proxyName = "arrow.type.proxy.Float64Type"; | ||
args = arrow.type.parseProxyArguments(proxyName, proxyID); | ||
[email protected](args{:}); | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,13 @@ | |
%INT16TYPE Type class for int8 data. | ||
|
||
methods | ||
function obj = Int16Type() | ||
[email protected]("Name", "arrow.type.proxy.Int16Type", "ConstructorArguments", {}) | ||
function obj = Int16Type(proxyID) | ||
arguments | ||
proxyID = missing | ||
end | ||
proxyName = "arrow.type.proxy.Int16Type"; | ||
args = arrow.type.parseProxyArguments(proxyName, proxyID); | ||
[email protected](args{:}); | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,13 @@ | |
%INT32TYPE Type class for int32 data. | ||
|
||
methods | ||
function obj = Int32Type() | ||
[email protected]("Name", "arrow.type.proxy.Int32Type", "ConstructorArguments", {}) | ||
function obj = Int32Type(proxyID) | ||
arguments | ||
proxyID = missing | ||
end | ||
proxyName = "arrow.type.proxy.Int32Type"; | ||
args = arrow.type.parseProxyArguments(proxyName, proxyID); | ||
[email protected](args{:}); | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,13 @@ | |
%INT64TYPE Type class for int64 data. | ||
|
||
methods | ||
function obj = Int64Type() | ||
[email protected]("Name", "arrow.type.proxy.Int64Type", "ConstructorArguments", {}) | ||
function obj = Int64Type(proxyID) | ||
arguments | ||
proxyID = missing | ||
end | ||
proxyName = "arrow.type.proxy.Int64Type"; | ||
args = arrow.type.parseProxyArguments(proxyName, proxyID); | ||
[email protected](args{:}); | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,13 @@ | |
%INT8TYPE Type class for int8 data. | ||
|
||
methods | ||
function obj = Int8Type() | ||
[email protected]("Name", "arrow.type.proxy.Int8Type", "ConstructorArguments", {}) | ||
function obj = Int8Type(proxyID) | ||
arguments | ||
proxyID = missing | ||
end | ||
proxyName = "arrow.type.proxy.Int8Type"; | ||
args = arrow.type.parseProxyArguments(proxyName, proxyID); | ||
[email protected](args{:}); | ||
end | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,17 @@ | |
end | ||
|
||
methods | ||
function obj = TimestampType(opts) | ||
function obj = TimestampType(proxyID, opts) | ||
%TIMESTAMPTYPE Construct an instance of this class | ||
arguments | ||
proxyID = missing | ||
opts.TimeUnit(1, 1) arrow.type.TimeUnit = arrow.type.TimeUnit.Microsecond | ||
opts.TimeZone(1, 1) string {mustBeNonmissing} = "" | ||
end | ||
args = struct(TimeUnit=string(opts.TimeUnit), TimeZone=opts.TimeZone); | ||
[email protected]("Name", "arrow.type.proxy.TimestampType", "ConstructorArguments", {args}); | ||
constructorrArgs = struct(TimeUnit=string(opts.TimeUnit), TimeZone=opts.TimeZone); | ||
proxyName = "arrow.type.proxy.TimestampType"; | ||
args = arrow.type.parseProxyArguments(proxyName, proxyID, {constructorrArgs}); | ||
[email protected](args{:}); | ||
end | ||
|
||
function unit = get.TimeUnit(obj) | ||
|
Oops, something went wrong.