dimas-b commented on code in PR #273: URL: https://github.com/apache/polaris/pull/273#discussion_r2021884942
########## extension/persistence/eclipselink/src/main/java/org/apache/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkStore.java: ########## @@ -278,21 +281,40 @@ long countActiveChildEntities( } List<ModelEntity> lookupFullEntitiesActive( - EntityManager session, long catalogId, long parentId, @Nonnull PolarisEntityType entityType) { + EntityManager session, + long catalogId, + long parentId, + @Nonnull PolarisEntityType entityType, + PageToken pageToken) { diagnosticServices.check(session != null, "session_is_null"); + diagnosticServices.check( + (pageToken instanceof EntityIdPageToken || pageToken instanceof ReadEverythingPageToken), + "unexpected_page_token"); checkInitialized(); // Currently check against ENTITIES not joining with ENTITIES_ACTIVE String hql = - "SELECT m from ModelEntity m where m.catalogId=:catalogId and m.parentId=:parentId and m.typeCode=:typeCode"; + "SELECT m from ModelEntity m " + + "where m.catalogId=:catalogId and m.parentId=:parentId and m.typeCode=:typeCode and m.id > :tokenId"; + + if (pageToken instanceof EntityIdPageToken) { Review Comment: What if it is not an `EntityIdPageToken`? -- 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