Richard Whitcomb created ARROW-7104:
---------------------------------------

             Summary: [Go] Unable to Resize/Reserve more space on ListBuilder 
after init
                 Key: ARROW-7104
                 URL: https://issues.apache.org/jira/browse/ARROW-7104
             Project: Apache Arrow
          Issue Type: Bug
         Environment: mac
            Reporter: Richard Whitcomb


When using the ListBuilder unless I reserve enough capacity on the initialize 
resize/init call I run into.  Based on the code I would expect to be able to 
grow the list builder after the initial call to reserve capacity.
{code:java}
panic: runtime error: index out of range [33] with length 33 [recovered]panic: 
runtime error: index out of range [33] with length 33 [recovered] panic: 
runtime error: index out of range [33] with length 33

github.com/apache/arrow/go/arrow/array.(*Int32Builder).UnsafeAppend(...)github.com/apache/arrow/go/arrow/array.(*Int32Builder).UnsafeAppend(...)
 
external/com_github_apache_arrow/go/arrow/array/numericbuilder.gen.go:479github.com/apache/arrow/go/arrow/array.(*Int32Builder).Append(0xc0000d3b00,
 0x21) 
external/com_github_apache_arrow/go/arrow/array/numericbuilder.gen.go:469 
+0xa9github.com/apache/arrow/go/arrow/array.(*ListBuilder).appendNextOffset(0xc0000d3b60)
 external/com_github_apache_arrow/go/arrow/array/list.go:152 
+0x4fgithub.com/apache/arrow/go/arrow/array.(*ListBuilder).Append(0xc0000d3b60, 
0xc0000d0001) external/com_github_apache_arrow/go/arrow/array/list.go:158 +0x90
{code}
Where the default slice size in the builders is 32.

If I print out the capacity and length of the builder I do see it grow as 
expected prior to this error.  My best guess is that while the capacity on the 
value builder is growing the resize calls aren't making its way to the offset 
int32 builder which is why you see that in the above stack.
{code:java}
Cap()=64 Len()=32{code}
I am using tag *apache-arrow-0.15.1*



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

Reply via email to