arrow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deneche A. Hakim (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ARROW-307) UnionListWriter does not behave properly when multiple lists are written in the same list
Date Tue, 27 Sep 2016 22:20:20 GMT
Deneche A. Hakim created ARROW-307:
--------------------------------------

             Summary: UnionListWriter does not behave properly when multiple lists are written
in the same list
                 Key: ARROW-307
                 URL: https://issues.apache.org/jira/browse/ARROW-307
             Project: Apache Arrow
          Issue Type: Bug
          Components: Java - Vectors
            Reporter: Deneche A. Hakim


if you run the following code:
{code}
    ListVector listVector = new ListVector("list", allocator, null);
    listVector.allocateNew();
    UnionListWriter listWriter = new UnionListWriter(listVector);

    listWriter.start();
    listWriter.startList();

    listWriter.list("a").startList();
    listWriter.list("a").bigInt().writeBigInt(1);
    listWriter.list("a").bigInt().writeBigInt(2);
    listWriter.list("a").bigInt().writeBigInt(3);
    listWriter.list("a").endList();

    listWriter.list("a").startList();
    listWriter.list("a").bigInt().writeBigInt(4);
    listWriter.list("a").bigInt().writeBigInt(5);
    listWriter.list("a").endList();

    listWriter.endList();
    listWriter.end();

    listWriter.setValueCount(1);
{code}

listVector will contain:
{noformat}
[{"a":[1,2,3,4,5]}]
{noformat}
Instead of
{noformat}
[{"a":[1,2,3],[4,5]}]
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message