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

[C#] MapArray doesn't override Accept(IArrowArrayVisitor) #40788

Closed
adamreeve opened this issue Mar 26, 2024 · 2 comments
Closed

[C#] MapArray doesn't override Accept(IArrowArrayVisitor) #40788

adamreeve opened this issue Mar 26, 2024 · 2 comments
Assignees
Milestone

Comments

@adamreeve
Copy link
Contributor

Describe the bug, including details regarding any error messages, version, and platform.

The MapArray class doesn't override the Accept method, so implementing IArrowArrayVisitor<MapArray> doesn't work as expected. If the visitor also implements IArrowArrayVisitor<ListArray> then this implementation will be used, otherwise the base IArrowArrayVisitor.Visit(IArrowArray) method is called.

Component(s)

C#

@adamreeve
Copy link
Contributor Author

take

CurtHagenlocher pushed a commit that referenced this issue Mar 26, 2024
### Rationale for this change

This allows users to implement `IArrowArrayVisitor<MapArray>` and have the `Visit(MapArray)` method called instead of `Visit(ListArray)` or `Visit(IArrowArray)`.

### What changes are included in this PR?

Overrides the `Accept` method to check whether the visitor implements `Visit(MapArray)`, and if not, delegates to the base implementation to handle `IArrowArrayVisitor<ListArray>` or fall back to using an `IArrowArrayVisitor`.

### Are these changes tested?

Yes, I've added unit tests.

### Are there any user-facing changes?

Yes, this is a user-facing change.
* GitHub Issue: #40788

Authored-by: Adam Reeve <adreeve@gmail.com>
Signed-off-by: Curt Hagenlocher <curt@hagenlocher.org>
@CurtHagenlocher CurtHagenlocher added this to the 16.0.0 milestone Mar 26, 2024
@CurtHagenlocher
Copy link
Contributor

Issue resolved by pull request 40789
#40789

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants