Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions go/arrow/ipc/file_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ func (ctx *arrayLoaderContext) loadArray(dt arrow.DataType) array.Interface {
*arrow.Float32Type, *arrow.Float64Type:
return ctx.loadPrimitive(dt)

case *arrow.BinaryType, *arrow.StringType:
return ctx.loadBinary(dt)

default:
panic(errors.Errorf("array type %T not handled yet", dt))
}
Expand Down Expand Up @@ -409,6 +412,16 @@ func (ctx *arrayLoaderContext) loadPrimitive(dt arrow.DataType) array.Interface
return array.MakeFromData(data)
}

func (ctx *arrayLoaderContext) loadBinary(dt arrow.DataType) array.Interface {
field, buffers := ctx.loadCommon(3)
buffers = append(buffers, ctx.buffer(), ctx.buffer())

data := array.NewData(dt, int(field.Length()), buffers, nil, int(field.NullCount()), 0)
defer data.Release()

return array.MakeFromData(data)
}

func readDictionary(meta *memory.Buffer, types dictTypeMap, r ReadAtSeeker) (int64, array.Interface, error) {
// msg := flatbuf.GetRootAsMessage(meta.Bytes(), 0)
// var dictBatch flatbuf.DictionaryBatch
Expand Down