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

(ipc.Writer).Write panics with `arrow/array: index out of range`

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 6.0.0
    • Go
    • macOS Catalina (version 10.15.7)

    Description

      My script panics when trying to write individual records to bytes. 

      The panic is

       

      panic: arrow/array: index out of range
      
      goroutine 1 [running]:
      github.com/apache/arrow/go/arrow/array.NewSliceData(0xc000182a20, 0x8, 0x1, 0x8904008)
      	/Users//opt/go/pkg/mod/github.com/apache/arrow/go/arrow@v0.0.0-20210318134220-775a714006e2/array/data.go:149 +0x1c6
      github.com/apache/arrow/go/arrow/ipc.(*recordEncoder).visit(0xc0001afa30, 0xc0001afa00, 0x1169180, 0xc000186740, 0x0, 0x0)
      	/Users//opt/go/pkg/mod/github.com/apache/arrow/go/arrow@v0.0.0-20210318134220-775a714006e2/ipc/writer.go:273 +0x15c5
      github.com/apache/arrow/go/arrow/ipc.(*recordEncoder).Encode(0xc0001afa30, 0xc0001afa00, 0x11696c0, 0xc00018e2d0, 0x10, 0x1773fd8)
              /Users//opt/go/pkg/mod/github.com/apache/arrow/go/arrow@v0.0.0-20210318134220-775a714006e2/ipc/writer.go:178 +0x285
      github.com/apache/arrow/go/arrow/ipc.(*Writer).Write(0xc000186b00, 0x11696c0, 0xc00018e2d0, 0x0, 0x0)
      	/Users//opt/go/pkg/mod/github.com/apache/arrow/go/arrow@v0.0.0-20210318134220-775a714006e2/ipc/writer.go:130 +0x1a8
      main.encodeDataArrow(0x11696c0, 0xc00018e2d0, 0x0, 0x0, 0x0, 0x0, 0x0)
      	/Users//workspace/record_serialize.go:46 +0x14c
      main.encodeDecode(0xc0001869c0, 0x3, 0x4)
              /Users//workspace/record_serialize.go:69 +0x219
      main.main()
              /Users//workspace/record_serialize.go:127 +0x793
      exit status 2
      

      Here is a quick script that exhibits this behavior: https://gist.github.com/amustafa/27ffc4c8debaeb05dbdf9608854bf670

       

      Version in `go.mod` is  v0.0.0-20210324124056-fe6ef7011137

      Attachments

        Issue Links

          Activity

            People

              zeroshade Matthew Topol
              amustafa2011 Adam Mustafa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m