suxiaogang223 opened a new issue, #1327:
URL: https://github.com/apache/paimon-rust/issues/1327

   ### Search before asking
   
   - [x] I searched the issues and pull requests and found no matching 
bounded-range export proposal. This extends #910 and the implementation in 
#1257.
   
   ### Motivation
   
   The C API already exports Java-compatible commit-message bodies, but its
   export function serializes the entire handle without an output limit. An
   embedding engine with a size-limited RPC cannot select smaller groups or
   reject excessive output until encoding and allocation have already occurred.
   
   ### Solution
   
   Keep the existing API and add:
   
   - `CommitMessage::serialize_with_limit(max_bytes)` in core, checking before
     appending bytes to the output while preserving Java v14 body encoding.
   - A C query for the number of messages in a standard message handle.
   - A C export function taking `offset`, `count` and a cumulative body-byte
     limit, returning the existing byte-array result and ownership convention.
   
   Reject invalid/overflowing ranges. An exceeded byte limit should return
   `ResourceExhausted`, no partial array, and leave the source usable so the 
caller
   can retry a smaller range. An empty range at or before the end should be 
valid.
   
   Keep host framing and Java list wrapping outside the API. The byte limit 
bounds
   accumulated body lengths, not peak memory: temporary metadata rows, vector
   capacity and result conversion can allocate additional memory.
   
   ### Anything else?
   
   Coverage should include Java fixture equality, exact and cumulative limits,
   range overflow, empty ranges, retry and output lifetime. Format Table export
   should remain unsupported. This is a focused follow-up to #1257 rather than
   another cross-process protocol. Prepared with AI assistance.
   
   ### Willingness to contribute
   
   - [x] I'm willing to submit a PR!
   


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