Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-38630: [MATLAB] arrow.array.BooleanArray's toMATLAB method does not take slice offsets into account #38636

Merged
merged 2 commits into from
Nov 9, 2023

Conversation

sgilmore10
Copy link
Member

@sgilmore10 sgilmore10 commented Nov 8, 2023

Rationale for this change

While working on #38415, I noticed that the toMATLAB method of arrow.array.BooleanArray does not take the slice offset into account. This will cause the toMATLAB method to return the wrong value.

What changes are included in this PR?

  1. Updated arrow::matlab::bit::unpack function to accept a start_offset as input.
  2. Updated clients (BooleanArray::toMATLAB and Array::getValid) to supply the array offset as the start_offset.

Are these changes tested?

The existing tests cover these changes. Additionally, the changes for #38415 will include tests that verify the toMATLAB method returns the correct MATLAB array when the underlying Arrow array has been sliced.

Are there any user-facing changes?

No.

@sgilmore10
Copy link
Member Author

The dev failure seems unrelated to my changes.

@sgilmore10
Copy link
Member Author

Looks like #38639 will fix the Dev/Lint CI failure.

@sgilmore10
Copy link
Member Author

Looks like the Dev GitHub Action failure was fixed by #38639.

Copy link
Member

@kevingurney kevingurney left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you for fixing this!

@kevingurney
Copy link
Member

+1

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Nov 9, 2023
@kevingurney kevingurney merged commit 4983885 into apache:main Nov 9, 2023
@kevingurney kevingurney deleted the GH-38630 branch November 9, 2023 16:14
@kevingurney kevingurney removed the awaiting merge Awaiting merge label Nov 9, 2023
Copy link

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 4983885.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 9 possible false positives for unstable benchmarks that are known to sometimes produce them.

loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…od does not take slice offsets into account (apache#38636)

### Rationale for this change

While working on apache#38415, I noticed that the `toMATLAB` method of `arrow.array.BooleanArray` does not take the slice offset into account. This will cause the `toMATLAB` method to return the wrong value.

### What changes are included in this PR?

1. Updated `arrow::matlab::bit::unpack` function to accept a `start_offset` as input.
2. Updated clients (`BooleanArray::toMATLAB` and `Array::getValid`) to supply the array `offset` as the `start_offset`.

### Are these changes tested?

The existing tests cover these changes. Additionally, the changes for apache#38415 will include tests that verify the `toMATLAB` method returns the correct MATLAB array when the underlying Arrow array has been sliced.

### Are there any user-facing changes?

No.

* Closes: apache#38630

Authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…od does not take slice offsets into account (apache#38636)

### Rationale for this change

While working on apache#38415, I noticed that the `toMATLAB` method of `arrow.array.BooleanArray` does not take the slice offset into account. This will cause the `toMATLAB` method to return the wrong value.

### What changes are included in this PR?

1. Updated `arrow::matlab::bit::unpack` function to accept a `start_offset` as input.
2. Updated clients (`BooleanArray::toMATLAB` and `Array::getValid`) to supply the array `offset` as the `start_offset`.

### Are these changes tested?

The existing tests cover these changes. Additionally, the changes for apache#38415 will include tests that verify the `toMATLAB` method returns the correct MATLAB array when the underlying Arrow array has been sliced.

### Are there any user-facing changes?

No.

* Closes: apache#38630

Authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Signed-off-by: Kevin Gurney <kgurney@mathworks.com>
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] arrow.array.BooleanArray's toMATLAB method does not take slice offsets into account
2 participants