removed clippy ignore statment#10111
Conversation
|
small refactor |
alamb
left a comment
There was a problem hiding this comment.
Looks good to me -- thank you @Rich-T-kid
| offset = encode_sink_buffer( | ||
| null_buffer, | ||
| buffers, | ||
| &mut meta.buffers, |
There was a problem hiding this comment.
the next PR could potentially update this to take the whole structure here (rather than &mut meta.buffers)
There was a problem hiding this comment.
I thought about doing that but only meta.buffers gets used. If you like that approach more I can change it right now
There was a problem hiding this comment.
I think it is a fine follow on -- the downside as you say is that it is now less obvious what is being used. The upside is that the logic is more encapsulated (the caller doesn't have to know that only the buffers are being used 🤔 )
There was a problem hiding this comment.
Make sense to me.
There was a problem hiding this comment.
Introduced this in the latest PR.
| sink: &mut IpcBodySink<'_>, | ||
| nodes: &mut Vec<crate::FieldNode>, | ||
| offset: i64, | ||
| num_rows: usize, |
|
run benchmark flight |
|
🤖 Arrow criterion benchmark running (GKE) | trigger CPU Details (lscpu)Comparing rich-T-kid/arrow-ipc-cleanup (f6ff6b1) to 301eb26 (merge-base) diff File an issue against this benchmark runner |
|
🤖 Arrow criterion benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagebase (merge-base)
branch
File an issue against this benchmark runner |
|
Thank you @Rich-T-kid |
Which issue does this PR close?
Resolves this #10044 (comment) from #10044
Rationale for this change
Code in this file is hard to navigate & its unclear what is happening.
What changes are included in this PR?
This PR introduces
IpcMetadataBuilder, a struct that groups the nodes and buffers vecs previously passed separately intowrite_array_data(), and removes the redundant num_rows/null_count parameters by deriving them fromarray_datadirectly. Together these reducewrite_array_data()from 10 arguments to 7, eliminating the #[allow(clippy::too_many_arguments)] suppression, and doc comments are added to clarify the two-channel output model betweenIpcMetadataBuilder(flatbuffer header metadata) andIpcBodySink(raw Arrow data bytes).Are these changes tested?
yes
Are there any user-facing changes?
no