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

GH-37720: [Format][Docs][FlightSQL] Document stateless prepared statements #40243

Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/source/format/FlightSql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,21 @@ 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 provide an updated handle in the response.
Updating the handle allows the client to supply all state required to
execute the query in an ActionPreparedStatementExecute message.
For example, stateless servers can encode the bound parameter values into
the new handle, and the client will send that new handle with parameters
back to the server.

Note that a handle returned from a DoPut call with
CommandPreparedStatementQuery can itself be passed to a subsequent DoPut
call with CommandPreparedStatementQuery to bind a new set of parameters.
The subsequent call itself may return an updated handled which again should
alamb marked this conversation as resolved.
Show resolved Hide resolved
be used for subsequent requests.

The server is responsible for detecting the case where the client does not
use the updated handle and should return an error.

When used with GetFlightInfo: execute the prepared statement. The
prepared statement can be reused after fetching results.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Server->>Client: ActionCreatePreparedStatementResult{handle}
loop for each invocation of the prepared statement
Client->>Server: DoPut(CommandPreparedStatementQuery)
Client->>Server: stream of FlightData
Server-->>Client: DoPutPreparedStatementResult{handle}
Note over Client,Server: optional response with updated handle
Client->>Server: GetFlightInfo(CommandPreparedStatementQuery)
Server->>Client: FlightInfo{endpoints: [FlightEndpoint{…}, …]}
loop for each endpoint in FlightInfo.endpoints
Expand Down
Loading
Loading