lidavidm commented on code in PR #34817: URL: https://github.com/apache/arrow/pull/34817#discussion_r1394783277
########## 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 think if you want to expose it, it would be best to have an explicit toplevel ToString function to call, like what we do here https://github.com/apache/arrow/blob/563078fb70f7d23e716a2c1c79e96f7409c02f3f/cpp/src/arrow/filesystem/filesystem.h#L46-L48 -- 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