From 5f594804be52d5629b2ff17ba4ea40c2473dc210 Mon Sep 17 00:00:00 2001 From: David Greiss Date: Sat, 3 Jun 2023 21:37:01 -0400 Subject: [PATCH] Revert "MINOR: [Go] Use `arrow.ListLikeType` (#35893)" This reverts commit 5a55fb4f66cbd316568085129054b5ff1d2eb089. --- go/arrow/ipc/file_reader.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/go/arrow/ipc/file_reader.go b/go/arrow/ipc/file_reader.go index a561352960a66..658d79d330684 100644 --- a/go/arrow/ipc/file_reader.go +++ b/go/arrow/ipc/file_reader.go @@ -595,7 +595,12 @@ func (ctx *arrayLoaderContext) loadMap(dt *arrow.MapType) arrow.ArrayData { return array.NewData(dt, int(field.Length()), buffers, []arrow.ArrayData{sub}, int(field.NullCount()), 0) } -func (ctx *arrayLoaderContext) loadList(dt arrow.ListLikeType) arrow.ArrayData { +type listLike interface { + arrow.DataType + Elem() arrow.DataType +} + +func (ctx *arrayLoaderContext) loadList(dt listLike) arrow.ArrayData { field, buffers := ctx.loadCommon(dt.ID(), 2) buffers = append(buffers, ctx.buffer()) defer releaseBuffers(buffers)