[ 
https://issues.apache.org/jira/browse/ARROW-8509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17086670#comment-17086670
 ] 

Kouhei Sutou commented on ARROW-8509:
-------------------------------------

We need to serialize to a buffer provided by Plasma. So the serialize function 
should receive an output buffer instead of creating a buffer internally and 
returning it.

For deserialize function, we should implement it as a method for 
{{GArrowBuffer}} not {{GArrowRecordBatch}}.

How about the following API?

{noformat}
/* c_glib/arrow-glib/record-batch.{cpp,h} */
gboolean 
garrow_record_batch_serialize(GArrowRecordBatch *record_batch, GArrowBuffer 
*output, GError **error);

/* c_glib/arrow-glib/buffer.{cpp,h} */
GArrowRecordBatch * 
garrow_buffer_deserialize_record_batch(GArrowBuffer *buffer, GArrowSchema 
*schema, GError **error);
{noformat}

BTW, do you want to complete this feature? Or you just share your request? (Do 
you want someone to complete this feature?) It seems that you didn't run our 
tests with your change. (Our CI shows your change causes a build error.)

> GArrowRecordBatch <-> GArrowBuffer conversion functions
> -------------------------------------------------------
>
>                 Key: ARROW-8509
>                 URL: https://issues.apache.org/jira/browse/ARROW-8509
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: GLib
>            Reporter: Tanveer
>            Assignee: Tanveer
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Hi All,
> I am working on integrating two programs, both of which are using Plasma API. 
> For this purpose, I need to convert RecordBatches to Buffer to transfer to 
> Plasma.
> I have created GArrowRecordBatch <-> GArrowBuffer conversion functions which 
> are working for me locally, but I am not sure if I have adopted the correct 
> way, I want it to be integrated into c_glib. Can you people please check 
> these functions and update/accept the pull request?
>  
> https://github.com/apache/arrow/pull/6963



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to