eric-maynard commented on code in PR #1838: URL: https://github.com/apache/polaris/pull/1838#discussion_r2139128145
########## polaris-core/src/main/java/org/apache/polaris/core/persistence/transactional/TreeMapTransactionalPersistenceImpl.java: ########## @@ -361,13 +362,19 @@ public List<EntityNameLookupRecord> lookupEntityActiveBatchInCurrentTxn( .map( nameRecord -> this.lookupEntityInCurrentTxn( - callCtx, catalogId, nameRecord.getId(), entityType.getCode())) - .filter(entityFilter); - if (pageToken instanceof HasPageSize) { - data = data.limit(((HasPageSize) pageToken).getPageSize()); + callCtx, catalogId, nameRecord.getId(), entityType.getCode())); + + Predicate<PolarisBaseEntity> tokenFilter = e -> true; + if (pageToken.hasDataReference()) { Review Comment: In cases like this, it's better to do a single assignment to prevent anything from breaking if lines get moved around: ``` final Predicate<PolarisBaseEntity> tokenFilter; if (pageToken.hasDataReference()) { tokenFilter = e -> e.getId() > nextId; } else { tokenFilter = e -> true; } ``` -- 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...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org