nastra commented on code in PR #9782:
URL: https://github.com/apache/iceberg/pull/9782#discussion_r1580985211
##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -494,22 +514,29 @@ public void createNamespace(
@Override
public List<Namespace> listNamespaces(SessionContext context, Namespace
namespace) {
- Map<String, String> queryParams;
- if (namespace.isEmpty()) {
- queryParams = ImmutableMap.of();
- } else {
- // query params should be unescaped
- queryParams = ImmutableMap.of("parent",
RESTUtil.NAMESPACE_JOINER.join(namespace.levels()));
+ Map<String, String> queryParams = Maps.newHashMap();
+ if (!namespace.isEmpty()) {
+ queryParams.put("parent",
RESTUtil.NAMESPACE_JOINER.join(namespace.levels()));
}
+ List<Namespace> namespaces = Lists.newArrayList();
+ String pageToken = "";
+ if (restPageSize != null) {
+ queryParams.put("pageSize", restPageSize);
+ }
Review Comment:
nit: the codebase usually adds a newline after the closing } from if
statements
##########
core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java:
##########
@@ -494,22 +514,29 @@ public void createNamespace(
@Override
public List<Namespace> listNamespaces(SessionContext context, Namespace
namespace) {
- Map<String, String> queryParams;
- if (namespace.isEmpty()) {
- queryParams = ImmutableMap.of();
- } else {
- // query params should be unescaped
- queryParams = ImmutableMap.of("parent",
RESTUtil.NAMESPACE_JOINER.join(namespace.levels()));
+ Map<String, String> queryParams = Maps.newHashMap();
+ if (!namespace.isEmpty()) {
+ queryParams.put("parent",
RESTUtil.NAMESPACE_JOINER.join(namespace.levels()));
}
+ List<Namespace> namespaces = Lists.newArrayList();
+ String pageToken = "";
+ if (restPageSize != null) {
+ queryParams.put("pageSize", restPageSize);
+ }
Review Comment:
nit: the codebase usually has a newline after the closing } from if
statements
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]