Repository navigation
feat(flight)!: expose prepared statement is_update - #12240
Draft
Phoenix500526 wants to merge 1 commit into
Draft
Phoenix500526 wants to merge 1 commit into
Phoenix500526 wants to merge 1 commit into
Conversation
Phoenix500526
force-pushed
the
issue/10082
branch
2 times, most recently
from
November 15, 2026 07:21
b944013 to
aa08c81
Compare
Clients need the server's execution hint to choose the query or update path without inferring it from the result schema. BREAKING CHANGE: ActionCreatePreparedStatementResult gains is_update. Downstream struct literals must initialize this field, e.g. with None. CLOSES apache#10082
Phoenix500526
force-pushed
the
issue/10082
branch
from
November 16, 2026 03:07
aa08c81 to
2a3d64f
Compare
Contributor
Author
|
@Rich-T-kid Thanks for marking this for the next major release. I'll move this PR to draft for now and mark it ready for review once development opens for 61.0.0. I'll rebase and rerun the relevant tests at that point. |
Phoenix500526
marked this pull request as draft
November 16, 2026 06:50
This branch has not been 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.
Which issue does this PR close?
Rationale for this change
Flight SQL servers can indicate whether a prepared statement should use the query or update execution path. Expose this information to Rust callers so they can choose the corresponding execution method without inferring it from the result schema.
What changes are included in this PR?
is_updateprotobuf field and regenerate the Rust bindings.PreparedStatementand exposeis_update() -> Option<bool>, with a documentation example showing caller-controlled execution.Some(false)in the server example and retainNonein the existing CLI test server.Are these changes tested?
A client integration test verifies that
Some(true),Some(false), and an absent field survive protobuf encoding, gRPC transport, andprepare(). The server example'stest_selectalso checks the hint through UDS, HTTP, and HTTPS. The API documentation example is compile-tested.The Flight unit, integration, CLI, and documentation tests pass, as do the server example tests with the documented
flight-sql,tls-ringfeatures. Workspace Clippy, formatting, and spelling checks pass. The full workspace test run stops inarrow-pyarrowbecause the local environment cannot loadlibpython3.12.dylib. Running the server example with all features also encounters a Rustls provider-selection conflict; the documented single-provider configuration passes.Are there any significant user-facing changes?
Breaking Rust source API change: the public
ActionCreatePreparedStatementResultstruct gainspub is_update: Option<bool>. Downstream struct literals that enumerate its fields must initialize the new field, for example withis_update: None. This change needs theapi-changelabel and a major-release merge window under the repository's compatibility policy.The protobuf change is wire-compatible: absent fields remain
None, and older clients can ignore the added field. The other new public API,PreparedStatement::is_update(&self) -> Option<bool>, is additive. Execution remains explicitly selected by the caller through the existingexecute()andexecute_update()methods.AI usage disclosure
Codex assisted with the protocol and client changes, examples, tests, documentation, review, and PR preparation. Rust protobuf bindings were regenerated with the repository's generator.