Skip to content

[C++][Go][Java][FlightRPC] Add support for result set expiration #35500

@kou

Description

@kou

Describe the enhancement requested

Based on the proposal in https://docs.google.com/document/d/1jhPyPZSOo2iy0LqIJVUs9KWPyFULVFJXTILDfkadx2g/edit# .
See also the discussion thread: https://lists.apache.org/thread/247z3t06mf132nocngc1jkp3oqglz7jp

Currently, it is undefined whether a client can call DoGet more than once. Clients may want to retry requests, and servers may not want to persist a query result forever.

Proposal

Add an expiration time to FlightEndpoint. If present, clients may assume they can retry DoGet requests. Otherwise, clients should avoid retrying DoGet requests.

message FlightEndpoint {
  // In UTC.
  google.protobuf.Timestamp expiration_time = 3;
}

This proposal is not a full retry protocol.

Also, add “pre-defined” actions to Flight RPC for working with result sets. These are pre-defined Protobuf messages with standardized encodings for use with DoAction:

  • CancelQuery CancelFlightInfo: Asynchronously cancel the execution of a distributed query. (Replaces the equivalent Flight SQL action.)
  • RefreshQuery RefreshFlightEndpoint: Request an extension of the expiration of a FlightEndpoint.
  • CloseQuery CloseFlightInfo: Close a FlightInfo so that the server can clean up resources early. (Only CancelFlightInfo will be enough.)

This lets the ADBC/JDBC/ODBC drivers for Flight SQL explicitly manage result set lifetimes. These can be used with Flight SQL as regular actions.

Prior Art

Component(s)

C++, FlightRPC

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions