Repository navigation
perf(reader): avoid copying inline Arrow results - #401
Merged
Merged
Conversation
Parse response bytes directly, decode base64 attachments from JSON strings, and move or borrow buffers through inline result readers. Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
vuanhphung
requested review from
aakash-saravanan-db,
cathleeny,
jay-xiao446 and
rahuls-db
October 16, 2026 20:20
aakash-saravanan-db
approved these changes
Oct 16, 2026
aakash-saravanan-db
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Checked buffer lifetimes and attachment validation, and confirmed the Python connector's PyO3 call path is unaffected by the constructor signature change.
|
Kernel integration tests triggered. View status. Results post back here as the "Kernel Integration Tests" check. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inline Arrow results copied each multi-MB response four extra times. Parse response bytes directly, decode base64 attachments through a serde visitor, and move or borrow buffers through the inline readers. Error messages still include the response body, and attachment validation is preserved.
Prior measurements at 32 connections on the inline workload showed about 7% lower CPU/query and 33% higher throughput for Python, and 10% lower CPU/query and 6% higher throughput for Go; Node was unchanged. Peak memory fell about 13% for Python and 2% for Go. This primarily improves CPU cost and latency, with a modest memory gain. See the memory write-up for context.
Validation:
cargo +stable fmt --all,cargo clippy --all-targets -- -D warnings, and fullcargo test, including doc tests. New coverage checks escaped JSON attachments, invalid base64, and non-string attachments.This pull request and its description were written by Isaac.