Skip to content

Conversation

@kevingurney
Copy link
Member

@kevingurney kevingurney commented May 11, 2023

Rationale for this change

Followup to #35495 in which we added the MATLAB class Float32Array.

This pull request adds support for round tripping signed integer between arrow.array.<Array> classes and associated MATLAB types (e.g. int8, int16, int32, int64).

Arrow Array Type MATLAB Type
Int8Array int8
Int16Array int16
Int32Array int32
Int64Array int64

Example of round-tripping int8 data:

>> int8MatlabArray = int8([1, 2, 3]')

int8MatlabArray =

  3x1 int8 column vector

   1
   2
   3

>> int8ArrowArray = arrow.array.Int8Array(int8MatlabArray) 

int8ArrowArray = 

[
  1,
  2,
  3
]

>> int8MatlabArrayRoundTripped = toMATLAB(int8ArrowArray)

int8MatlabArrayRoundTripped =

  3x1 int8 column vector

   1
   2
   3

>> all(int8MatlabArray == int8MatlabArrayRoundTripped)

ans =

  logical

   1

What changes are included in this PR?

Added four new signed integer type arrow.array.<Array> concrete subclasses.

  1. arrow.array.Int8Array
  2. arrow.array.Int16Array
  3. arrow.array.Int32Array
  4. arrow.array.Int64Array

Are these changes tested?

Yes, we added the following four test classes:

  1. tInt8Array.m
  2. tInt16Array.m
  3. tInt32Array.m
  4. tInt64Array.m

Are there any user-facing changes?

Yes. This change introduces 4 new publicly documented classes:

  1. arrow.array.Int8Array
  2. arrow.array.Int16Array
  3. arrow.array.Int32Array
  4. arrow.array.Int64Array

Future Directions

  1. Add support for null values (i.e. validity bitmap) for the signed integer array types.

Notes

!. Thank you to @sgilmore10 for her help with this pull request!

@github-actions
Copy link

@kevingurney
Copy link
Member Author

Note: This is related to #35562 (see #35562 (comment)). Depending on the order of code review / merging of changes, these changes may need to be rebased. We are more than happy to help with the rebasing if needed.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels May 19, 2023
kevingurney and others added 2 commits May 22, 2023 14:19
Co-authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Co-authored-by: Sarah Gilmore <sgilmore@mathworks.com>
@kou kou merged commit fbe5f64 into apache:main May 22, 2023
@ursabot
Copy link

ursabot commented May 30, 2023

Benchmark runs are scheduled for baseline = 0dca449 and contender = fbe5f64. fbe5f64 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.42% ⬆️0.21%] test-mac-arm
[Finished ⬇️1.31% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.0% ⬆️0.21%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] fbe5f641 ec2-t3-xlarge-us-east-2
[Finished] fbe5f641 test-mac-arm
[Finished] fbe5f641 ursa-i9-9960x
[Finished] fbe5f641 ursa-thinkcentre-m75q
[Finished] 0dca449f ec2-t3-xlarge-us-east-2
[Finished] 0dca449f test-mac-arm
[Finished] 0dca449f ursa-i9-9960x
[Finished] 0dca449f ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@sgilmore10 sgilmore10 deleted the GH-35558 branch June 27, 2023 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MATLAB] Add signed integer array MATLAB classes (i.e. Int8Array, Int16Array, Int32Array, Int64Array)

3 participants