-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-37720: [Format][Docs][FlightSQL] Document stateless prepared statements #40243
Changes from 6 commits
3061d9d
cfce010
dc96ef7
d4a30c1
0f4d1f4
bb2d155
8ea3ca0
e073001
d4dd713
8ddc3c3
b5ad6c5
6cffe2f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,13 @@ the ``type`` should be ``ClosePreparedStatement``). | |
Execute a previously created prepared statement and get the results. | ||
|
||
When used with DoPut: binds parameter values to the prepared statement. | ||
The server may optionally respond with an updated handle. The client | ||
should use this updated handle for all subsequent requests for this | ||
prepared statement. The updated handle allows implementing query | ||
parameters with stateless services. Note that the server is responsible | ||
for detecting the case where the client does not use the updated handle on | ||
subsequent requests (older clients may ignore this field) and responding | ||
appropriately. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does "appropriately" imply? Return an error? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I think it means the server should return an error. Perhaps we can reword like
|
||
|
||
When used with GetFlightInfo: execute the prepared statement. The | ||
prepared statement can be reused after fetching results. | ||
|
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.
This is very difficult to understand. How does an updated handle allow implementing query parameters? This should be more descriptive (does the handle embody the bound parameters?).
Also, "the client should use this updated handle" means the client cannot bind the original prepared statement to other 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.
Maybe we can say something like this:
The problem is as currently written, the
CommandPrepareStatementQuery
message contains parameter values, but does not return anything to the client prior to the client sendingActionPreparedStatementExecute
. Thus the only way to implement prepared statements with bind parameters today is to store the value of the parameters on the server between the call toCommandPrepareStatementQuery
andActionPreparedStatementExecute
.That is an excellent question. I think the intent is that the handle could be updated with new parameter values. I agree as worded this is confusing and should be clarified