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

[jira] [Assigned] (ARROW-8128) [C#] NestedType children serialized on wrong length

     [ https://issues.apache.org/jira/browse/ARROW-8128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kouhei Sutou reassigned ARROW-8128:
-----------------------------------

    Assignee: Takashi Hashida

> [C#] NestedType children 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
>            Assignee: Takashi Hashida
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Each node of NestedType children is serialized on a previous node Length and NullCount.
> This causes wrong data access at ListArray.GetValueOffset and so on.
>  
> [https://github.com/apache/arrow/blob/master/csharp/src/Apache.Arrow/Ipc/ArrowReaderImplementation.cs#L219]
>  
> {code:java}
> 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:java}
> 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)