XiangpengHao commented on code in PR #5525:
URL: https://github.com/apache/arrow-rs/pull/5525#discussion_r1538288372
##########
arrow-ipc/src/writer.rs:
##########
@@ -425,6 +430,8 @@ impl IpcDataGenerator {
compression_codec,
write_options,
)?;
+
+ set_variadic_buffer_counts(&mut variadic_buffer_counts, array);
Review Comment:
The type match in `append_variadic_buffer_counts ` don't match nicely with
`write_array_data`, for example, we need to break the following match into
repeating code.
https://github.com/apache/arrow-rs/blob/86543a4b835f898308bd28a33d0da9d2ea7a9b35/arrow/src/ipc/writer.rs#L1041-L1046
Current `write_array_data` also repeats the type mach twice:
https://github.com/XiangpengHao/arrow-rs/blob/5b1821e0564f586f6f98e5c392a0a208890055df/arrow-ipc/src/writer.rs#L1356-L1358
I think it's probably better to keep `append_variadic_buffer_counts` in a
separate function for now and then we should probably file a followup issue to
improve the nesting type traversal and maybe cleanup the function a bit.
What do you think?
--
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]