Takashi Hashida created ARROW-8128:
--------------------------------------

             Summary: [C#] NestedType values serialized on wrong length
                 Key: ARROW-8128
                 URL: https://issues.apache.org/jira/browse/ARROW-8128
             Project: Apache Arrow
          Issue Type: Bug
          Components: C#
            Reporter: Takashi Hashida


NestedType Values is serialized on parent node Length and NullCount.

 

[https://github.com/apache/arrow/blob/master/csharp/src/Apache.Arrow/Ipc/ArrowReaderImplementation.cs#L219]

 

{code}
Flatbuf.FieldNode childFieldNode = recordBatchEnumerator.CurrentNode;
recordBatchEnumerator.MoveNextNode();
{code}

At this lines, MoveNextNode should be executed before assigning CurrentNode.

this can be reproduced by changing TestData.ArrayCreator.Visit(ListType type) 
like below and execute ArrowFileReaderTests.

{code}
public void Visit(ListType type)
 {
 var builder = new ListArray.Builder(type.ValueField).Reserve(Length);

//Todo : Support various types
 var valueBuilder = (Int64Array.Builder)builder.ValueBuilder.Reserve(Length);

for (var i = 0; i < Length; i++)
 {
 builder.Append();
 valueBuilder.Append(i);
 }

//Add a value to check if Values length can exceed ListArray length
 valueBuilder.Append(0);

Array = builder.Build();
 }
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to