-
Notifications
You must be signed in to change notification settings - Fork 4.1k
GH-37720: [Go][FlightSQL] Add prepared statement handle to DoPut result #40311
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
Merged
lidavidm
merged 7 commits into
apache:main
from
erratic-pattern:adam/flightsql/stateless-prepared-statement-params-go
Apr 23, 2024
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e20ea8e
GH-37720: [Go][FlightSQL] Implement stateless prepared statements
erratic-pattern b9b28d8
regenerate Go protobuf code from updated format
erratic-pattern 297ae38
fix
lidavidm 8657814
capture prepared statement handle in Go client
erratic-pattern 64088a2
update flightsql tests
erratic-pattern c4aab03
fix nil handling for legacy servers
erratic-pattern af0765e
Merge branch 'main' of github.com:apache/arrow into adam/flightsql/st…
erratic-pattern File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a Go expert, but is this caching the prepared statement with parameters against the original handle?
Should a stateless implementation provide a new handle, presumably containing query and parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is caching the prepared statement parameters against the original handle.
According to the updated spec, it is optional for the server to respond with an updated handle. In this example, we aren't leveraging the statelessness to embed the arguments and everything into the handle itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for clarifying @zeroshade . Looks like I have a grasp of Go then.
I think if possible it would be worth having an example of stateless use in this PR. That might be a bigger change since this server implementation is based on stateful behaviour.
I guess I'm curious how we would create a new handle based on query and parameters or if we need a new proto message from which we can generate a handle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the handles are completely opaque to the protocol, it would depend entirely on how a given server chooses to represent its handle. The example server just uses a random character string as the handle which is a key into the map. But the handle could just as easily be a serialized protobuf message, etc. if desired.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I get that it's opaque so really doesn't matter here. I'll post a Java implementation PR soon with a stateless example which might be useful, but very much down to individuals what they might pick from it.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I decided an actual stateless implementation was out of scope for this change, and just made the minimal change to achieve compatibility with the new spec, which allows for either stateless or stateful server implementation. There is certainly an argument to be made for stateless implementation, but I leave that decision up to the maintainers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title of this PR is misworded then, so I will update it to reflect what the change is.