adamreeve opened a new issue, #40790: URL: https://github.com/apache/arrow/issues/40790
### Describe the bug, including details regarding any error messages, version, and platform. Code to reproduce, as an XUnit test: ```C# [Fact] public void TestSliceStructArray() { const int numRows = 10; var fields = new List<Field> { new Field.Builder().Name("ints").DataType(new Int32Type()).Nullable(true).Build(), }; var arrays = new List<IArrowArray> { new Int32Array.Builder().AppendRange(Enumerable.Range(0, numRows)).Build(), }; var nullBitmap = new ArrowBuffer.BitmapBuilder().AppendRange(true, numRows).Build(); var array = new StructArray(new StructType(fields), numRows, arrays, nullBitmap, nullCount: 0); var slicedArray = (StructArray) array.Slice(3, 4); Assert.Equal(4, slicedArray.Length); Assert.Single(slicedArray.Fields); var slicedField = slicedArray.Fields[0]; Assert.Equal(4, slicedField.Length); // Fails with "Actual: 10" } ``` Is this expected behaviour? If not, I'm happy to look into fixing this. The existing behaviour should probably be kept for backwards compatibility though, in case users are slicing the child fields themselves to work around this. ### Component(s) C# -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org