zeroshade commented on code in PR #13806:
URL: https://github.com/apache/arrow/pull/13806#discussion_r939217901
##########
go/arrow/ipc/file_reader.go:
##########
@@ -617,6 +626,45 @@ func (ctx *arrayLoaderContext) loadStruct(dt
*arrow.StructType) arrow.ArrayData
return array.NewData(dt, int(field.Length()), buffers, subs,
int(field.NullCount()), 0)
}
+func (ctx *arrayLoaderContext) loadUnion(dt arrow.UnionType) arrow.ArrayData {
+ nBuffers := 2
Review Comment:
added
##########
go/arrow/ipc/file_reader.go:
##########
@@ -617,6 +626,45 @@ func (ctx *arrayLoaderContext) loadStruct(dt
*arrow.StructType) arrow.ArrayData
return array.NewData(dt, int(field.Length()), buffers, subs,
int(field.NullCount()), 0)
}
+func (ctx *arrayLoaderContext) loadUnion(dt arrow.UnionType) arrow.ArrayData {
+ nBuffers := 2
+ if dt.Mode() == arrow.DenseMode {
+ nBuffers = 3
+ }
+
+ field, buffers := ctx.loadCommon(dt.ID(), nBuffers)
+ if field.NullCount() != 0 && buffers[0] != nil {
+ panic("cannot read pre-1.0.0 union array with top-level
validity bitmap")
Review Comment:
prefixed
##########
go/arrow/ipc/file_reader.go:
##########
@@ -381,6 +382,7 @@ func (src *ipcSource) buffer(i int) *memory.Buffer {
if !src.meta.Buffers(&buf, i) {
panic("buffer index out of bound")
Review Comment:
prefixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]