Skip to content

[C#] Union arrays don't account for offset and length #41140

Closed
@adamreeve

Description

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

Similar to #40790, a sliced union array doesn't behave as expected as none of the methods or properties account for the offset and length.

This should work differently for sparse and dense unions. For a sparse union, the child arrays should be sliced when accessed, and the offset and slice should be accounted for in the TypeIds span. For a dense union, the child arrays shouldn't be sliced but the TypeIds and ValueOffsets spans should.

Component(s)

C#

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions