elphastori commented on code in PR #13129: URL: https://github.com/apache/iceberg/pull/13129#discussion_r2121473521
########## core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java: ########## @@ -268,13 +268,12 @@ public List<TableIdentifier> listTables(SessionContext context, Namespace ns) { checkNamespaceIsValid(ns); Map<String, String> queryParams = Maps.newHashMap(); ImmutableList.Builder<TableIdentifier> tables = ImmutableList.builder(); - String pageToken = ""; + String pageToken = null; Review Comment: I've reverted the changes. I'll explore other ways to add a separate a unit test like you've suggested. > > The issue with older servers expecting an empty string for the initial `pageToken` still stands. > > I don't think this is true, because the `queryParams` have been moved further below and are not being sent anymore on the first request. An older server would be expecting `pageToken` and `pageSize` to be sent on the very first request This is no longer relevant after the revert, but just to clarify: the `queryParams` were still being sent on all requests, it was only the `pageToken` parameter that was excluded on the first request. That omission would indeed have broken compatibility with older servers expecting it This was the example sequence of requests from the unit tests: - http://localhost:8181/v1/namespaces/default/tables?pageSize=10 - http://localhost:8181/v1/namespaces/default/tables?pageSize=10&pageToken=10 - http://localhost:8181/v1/namespaces/default/tables?pageSize=10&pageToken=20 -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org