Skip to content

Commit 2ffd4aa

Browse files
committed
1
1 parent 52eb7d6 commit 2ffd4aa

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/iceberg/catalog/rest/http_client.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
namespace iceberg::rest {
2828

29-
//... 构造函数实现...
30-
3129
template <typename R, typename E, std::uint16_t SuccessCode>
3230
Result<R> HttpClient::Get(const std::string& target, const cpr::Parameters& params) {
3331
session_.SetUrl(cpr::Url{session_.GetFullRequestUrl() + target});

src/iceberg/catalog/rest/json_internal.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ nlohmann::json ToJson(const ListNamespaceResponse& response) {
9797
nlohmann::json json;
9898
json[kNamespaces] = response.namespaces;
9999

100-
if (response.next_page_token.has_value()) {
101-
json[kNextPageToken] = response.next_page_token.value();
102-
}
103-
104100
return json;
105101
}
106102

@@ -110,7 +106,7 @@ Result<ListNamespaceResponse> ListNamespaceResponseFromJson(const nlohmann::json
110106

111107
if (!json.contains(kNamespaces)) {
112108
return std::unexpected(
113-
Status::InvalidArgument("ListNamespaceResponse missing 'namespaces' field"));
109+
InvalidArgument("ListNamespaceResponse missing 'namespaces' field"));
114110
}
115111
response.namespaces = json[kNamespaces].get<std::vector<std::vector<std::string>>>();
116112

@@ -120,7 +116,7 @@ Result<ListNamespaceResponse> ListNamespaceResponseFromJson(const nlohmann::json
120116

121117
return response;
122118
} catch (const std::exception& e) {
123-
return std::unexpected(Status::InvalidArgument(
119+
return std::unexpected(InvalidArgument(
124120
std::format("Failed to parse ListNamespaceResponse: {}", e.what())));
125121
}
126122
}

0 commit comments

Comments
 (0)