dimas-b commented on code in PR #2508:
URL: https://github.com/apache/polaris/pull/2508#discussion_r2323238648


##########
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc/JdbcBasePersistenceImpl.java:
##########
@@ -456,7 +457,12 @@ public List<PolarisBaseEntity> lookupEntities(
     if (entityIds == null || entityIds.isEmpty()) return new ArrayList<>();
     PreparedQuery query = 
QueryGenerator.generateSelectQueryWithEntityIds(realmId, entityIds);
     try {
-      return datasourceOperations.executeSelect(query, new ModelEntity());
+      Map<PolarisEntityId, PolarisBaseEntity> idMap =
+          datasourceOperations.executeSelect(query, new ModelEntity()).stream()
+              .collect(
+                  Collectors.toMap(
+                      e -> new PolarisEntityId(e.getCatalogId(), e.getId()), 
Function.identity()));
+      return entityIds.stream().map(idMap::get).collect(Collectors.toList());

Review Comment:
   nevermind, I think existing tests are good enough :)



-- 
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]

Reply via email to