You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Takashi Hashida (Jira)" <ji...@apache.org> on 2020/03/16 05:02:00 UTC

[jira] [Created] (ARROW-8128) [C#] NestedType values serialized on wrong length

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)