schaefer01 commented on issue #35477:
URL: https://github.com/apache/arrow/issues/35477#issuecomment-1538505737

   I forgot the to_bytes function:
   def pa_to_bytes(data_in):
     debug_f = False
   
     batch = pa.record_batch([data_in],names=['f0'])
   
     if (debug_f):
       print("len(batch)=",len(batch))
   
     sink = pa.BufferOutputStream()
   
     # print("len(sink)=",len(sink)) # sink has no length
   
     with pa.ipc.new_stream(sink, batch.schema) as writer:
       #for i in range(8*1024):
         writer.write_batch(batch)
       # end for
     # end with 
   
     buf = sink.getvalue()
   
     pa_bytes = buf.to_pybytes()
   
     return pa_bytes
   
   # end pa_to_bytes


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