Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7104

[Go] Unable to Resize/Reserve more space on ListBuilder after init

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • None
    • None
    • Go
    • None
    • mac

    Description

      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.

      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
      

      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.

      Cap()=64 Len()=32

      I am using tag apache-arrow-0.15.1

      Attachments

        Activity

          People

            Unassigned Unassigned
            rwhitcomb_nvidia Richard Whitcomb
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: