indigophox commented on code in PR #34817:
URL: https://github.com/apache/arrow/pull/34817#discussion_r1394778234


##########
cpp/src/arrow/flight/types.h:
##########
@@ -750,6 +754,190 @@ struct ARROW_FLIGHT_EXPORT CancelFlightInfoRequest {
   static arrow::Result<CancelFlightInfoRequest> Deserialize(std::string_view 
serialized);
 };
 
+/// \brief Variant supporting all possible value types for 
{Set,Get}SessionOptions
+using SessionOptionValue = std::variant<std::string, bool, int32_t, int64_t, 
float,
+                                        double, std::vector<std::string>>;
+
+/// \brief The result of setting a session option.
+enum class SetSessionOptionStatus : int8_t {
+  /// \brief 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.
+  kUnspecified,
+  // The session option setting completed successfully.
+  kOk,
+  /// \brief The given session option name was an alias for another option 
name.
+  kOkMapped,
+  /// \brief The given session option name is invalid.
+  kInvalidKey,
+  /// \brief The session option value is invalid.
+  kInvalidValue,
+  /// \brief The session option cannot be set.
+  kError
+};
+std::ostream& operator<<(std::ostream& os, const SetSessionOptionStatus& r);
+
+/// \brief The result of closing a session.
+enum class CloseSessionStatus : int8_t { kUnspecified, kClosed, kClosing, 
kNotClosable };
+std::ostream& operator<<(std::ostream& os, const CloseSessionStatus& r);
+
+static const char* const SetSessionOptionStatusNames[] = {

Review Comment:
   I'd somewhat wanted this exposed to API users, although unfortunately of 
course one can't add the rest of the window dressing to the C++ enum classes to 
go along with it.  Ok with moving it if you think that's cleaner: I don't see 
that there's a concrete use case it just seemed intuitive to have it visible.  
Or are you thinking to define in the .cc and leave it declared here?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to