itsjunetime opened a new pull request, #6690:
URL: https://github.com/apache/arrow-rs/pull/6690

   # Which issue does this PR close?
   
   Closes #3478 
   
   # What changes are included in this PR?
   
   This reworks the encoding/writing step of flight data messages to ensure it 
never overflows the given limit whenever possible (specifically, it's 
impossible when we can't even fit a single row + header within the limit - 
there are still no mechanisms for splitting a single row of data between 
multiple messages).
   
   It does this by first constructing a fake IPC header, then getting that 
header's encoded length, and then subtracting that length from the provided max 
size. Because the header's size stays the same with the same schema (the only 
thing that changes is the value within the 'length of data' fields), we don't 
need to continually recalculate it.
   
   There are more tests I'd like to add before merging this, I was just hoping 
to get this filed first so that I could get feedback in case any behavior 
seemed seriously off.
   
   # Rationale for these changes
   
   Since we are dynamically checking array data sizes to see if they can fit 
within the alloted size, this ensures that they will never go over if possible. 
Of course, as I said before, they will still go over if necessary, but I've 
rewritten the tests to check this behavior (if the tests sense an overage, but 
decode it to see that only one row was written, they allow it as there is no 
other way to get the data across).
   
   # Are there any user-facing changes?
   
   Yes, there are API additions. They are documented. As far as I can tell, 
this shouldn't require a breaking release, but I haven't run anything like 
cargo-semver-checks on it to actually verify.


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