felipecrv commented on code in PR #43330:
URL: https://github.com/apache/arrow/pull/43330#discussion_r1685509397
##########
cpp/src/arrow/flight/types.cc:
##########
@@ -151,18 +151,57 @@ Status MakeFlightError(FlightStatusCode code, std::string
message,
std::make_shared<FlightStatusDetail>(code,
std::move(extra_info)));
}
-bool FlightDescriptor::Equals(const FlightDescriptor& other) const {
- if (type != other.type) {
- return false;
+static std::ostream& operator<<(std::ostream& os, std::vector<std::string>
values) {
+ os << '[';
+ std::string sep = "";
+ for (const auto& v : values) {
+ os << sep << std::quoted(v);
+ sep = ", ";
}
- switch (type) {
- case PATH:
- return path == other.path;
- case CMD:
- return cmd == other.cmd;
- default:
- return false;
+ os << ']';
+
+ return os;
+}
+
+template <typename T>
+static std::ostream& operator<<(std::ostream& os, std::map<std::string, T> m) {
Review Comment:
The `map` here needs to be taken by `const &`. I will do this in another PR.
--
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]