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


##########
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:
   If/when we decide to remove it later, I think we should just remove it from 
the code entirely, instead of trying to flag 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