Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make flight tonic error boxed #7229

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

XiangpengHao
Copy link
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

When working on the nightly rust, I noticed that clippy warns about FlightError too large, more than 176 bytes.

I think it makes sense to keep the error small (32 bytes), as the Result<...> is used in a lot of places.

This PR basically makes Tonic(tonic::Status) into Tonic(Box<tonic::Status>), which reduces the FlightError from 176 bytes down to 32 bytes.

This adds an extra allocation on error, but should probably be fine as it's not on hot path.

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate labels Mar 3, 2025
@tustvold tustvold added the api-change Changes to the arrow API label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-change Changes to the arrow API arrow Changes to the arrow crate arrow-flight Changes to the arrow-flight crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants