zeroshade commented on code in PR #33951:
URL: https://github.com/apache/arrow/pull/33951#discussion_r1092157902


##########
go/arrow/cdata/cdata_exports.go:
##########
@@ -385,7 +390,13 @@ func exportArray(arr arrow.Array, out *CArrowArray, 
outSchema *CArrowSchema) {
                for i := range bufs {
                        buf := bufs[i]
                        if buf == nil || buf.Len() == 0 {
-                               buffers[i] = nil
+                               if i > 0 || 
!internal.HasValidityBitmap(arr.DataType().ID(), flatbuf.MetadataVersionV5) {
+                                       // apache/arrow#33936: export a dummy 
buffer to be friendly to
+                                       // implementations that don't import 
NULL properly
+                                       buffers[i] = 
(*C.void)(unsafe.Pointer(&C.kGoCdataZeroRegion))
+                               } else {
+                                       buffers[i] = nil
+                               }

Review Comment:
   should this be behind some sort of flag so that we can easily switch back to 
using `nil` when the other implementations catch up? Or is that not worth it?



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