indigophox commented on code in PR #34817:
URL: https://github.com/apache/arrow/pull/34817#discussion_r1478737281
##########
format/Flight.proto:
##########
@@ -525,3 +525,117 @@ message FlightData {
message PutResult {
bytes app_metadata = 1;
}
+
+/*
+ * EXPERIMENTAL: Union of possible value types for a Session Option to be set
to.
+ *
+ * By convention, an attempt to set a valueless SessionOptionValue should
+ * attempt to unset or clear the named option value on the server.
+ */
+message SessionOptionValue {
+ message StringListValue {
+ repeated string values = 1;
+ }
+
+ oneof option_value {
+ string string_value = 1;
+ bool bool_value = 2;
+ sfixed64 int64_value = 3;
+ double double_value = 4;
+ StringListValue string_list_value = 5;
+ }
+}
+
+/*
+ * EXPERIMENTAL: A request to set session options for an existing or new
(implicit)
+ * server session.
+ *
+ * Sessions are persisted and referenced via a transport-level state
management, typically
+ * RFC 6265 HTTP cookies when using an HTTP transport. The suggested cookie
name or state
+ * context key is 'arrow_flight_session_id', although implementations may
freely choose their
+ * own name.
+ *
+ * Session creation (if one does not already exist) is implied by this RPC
request, however
+ * server implementations may choose to initiate a session that also contains
client-provided
+ * session options at any other time, e.g. on authentication, or when any
other call is made
+ * and the server wishes to use a session to persist any state (or lack
thereof).
+ */
+message SetSessionOptionsRequest {
+ map<string, SessionOptionValue> session_options = 1;
+}
+
+/*
+ * EXPERIMENTAL: The results (individually) of setting a set of session
options.
+ *
+ * Option names should only be present in the response if they were not
successfully
+ * set on the server; that is, a response without an Error for a name provided
in the
+ * SetSessionOptionsRequest implies that the named option value was set
successfully.
+ */
+message SetSessionOptionsResult {
+ enum ErrorValue {
+ // The status of setting the option is unknown. Servers should avoid using
+ // this value (send a NOT_FOUND error if the requested query is
+ // not known). Clients can retry the request.
Review Comment:
Related (maybe a future change, though), I think it would be useful to more
explicitly call out the `0` enum values as being effectively reserved by
Protobuf, and a hint as to what's going on there, rather than the current
clumsy wording this patch has inherited from elsewhere that loosely suggests
they're reserved by the Flight protocol definition.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]