Skip to content

GH-41140: [C#] Account for offset and length in union arrays#41165

Merged
CurtHagenlocher merged 2 commits intoapache:mainfrom
adamreeve:union_slice
Apr 12, 2024
Merged

GH-41140: [C#] Account for offset and length in union arrays#41165
CurtHagenlocher merged 2 commits intoapache:mainfrom
adamreeve:union_slice

Conversation

@adamreeve
Copy link
Copy Markdown
Contributor

@adamreeve adamreeve commented Apr 12, 2024

Rationale for this change

See #41140. This makes a sliced union array behave as expected without having to manually account for the array offset unless accessing the underlying buffers.

What changes are included in this PR?

Accounts for the offset and length when getting type ids, value offsets and field arrays for sparse and dense union arrays.

Are these changes tested?

Yes, I've updated the union array tests to cover this.

Are there any user-facing changes?

Yes, this is a user facing bug fix.

@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #41140 has been automatically assigned in GitHub to PR creator.

Copy link
Copy Markdown
Contributor

@CurtHagenlocher CurtHagenlocher left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@CurtHagenlocher CurtHagenlocher merged commit 48a9639 into apache:main Apr 12, 2024
@CurtHagenlocher CurtHagenlocher removed the awaiting review Awaiting review label Apr 12, 2024
@github-actions github-actions bot added the awaiting committer review Awaiting committer review label Apr 12, 2024
@conbench-apache-arrow
Copy link
Copy Markdown

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

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

@adamreeve adamreeve deleted the union_slice branch April 14, 2024 22:15
raulcd pushed a commit that referenced this pull request May 8, 2024
### Rationale for this change

See #41140. This makes a sliced union array behave as expected without having to manually account for the array offset unless accessing the underlying buffers.

### What changes are included in this PR?

Accounts for the offset and length when getting type ids, value offsets and field arrays for sparse and dense union arrays.

### Are these changes tested?

Yes, I've updated the union array tests to cover this.

### Are there any user-facing changes?

Yes, this is a user facing bug fix.
* GitHub Issue: #41140

Authored-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Curt Hagenlocher <curt@hagenlocher.org>
vibhatha pushed a commit to vibhatha/arrow that referenced this pull request May 25, 2024
…pache#41165)

### Rationale for this change

See apache#41140. This makes a sliced union array behave as expected without having to manually account for the array offset unless accessing the underlying buffers.

### What changes are included in this PR?

Accounts for the offset and length when getting type ids, value offsets and field arrays for sparse and dense union arrays.

### Are these changes tested?

Yes, I've updated the union array tests to cover this.

### Are there any user-facing changes?

Yes, this is a user facing bug fix.
* GitHub Issue: apache#41140

Authored-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Curt Hagenlocher <curt@hagenlocher.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants