pitrou commented on code in PR #14223:
URL: https://github.com/apache/arrow/pull/14223#discussion_r1092172742


##########
go/arrow/ipc/metadata.go:
##########
@@ -425,6 +425,19 @@ func (fv *fieldVisitor) visit(field arrow.Field) {
                flatbuf.MapAddKeysSorted(fv.b, dt.KeysSorted)
                fv.offset = flatbuf.MapEnd(fv.b)
 
+       case *arrow.RunEndEncodedType:
+               fv.dtype = flatbuf.TypeRunEndEncoded
+               var offsets [2]flatbuffers.UOffsetT
+               offsets[0] = fieldToFB(fv.b, fv.pos.Child(0),
+                       arrow.Field{Name: "run_ends", Type: dt.RunEnds()}, 
fv.memo)
+               offsets[1] = fieldToFB(fv.b, fv.pos.Child(1),
+                       arrow.Field{Name: "values", Type: dt.Encoded(), 
Nullable: true}, fv.memo)
+               flatbuf.RunEndEncodedStart(fv.b)
+               fv.b.PrependUOffsetT(offsets[1])
+               fv.b.PrependUOffsetT(offsets[0])

Review Comment:
   Does flatbuffers mandate the offsets being appended in reverse order here?



-- 
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]

Reply via email to