dimas-b commented on code in PR #3940: URL: https://github.com/apache/polaris/pull/3940#discussion_r2892983197
########## polaris-core/src/main/java/org/apache/polaris/core/persistence/resolver/PolarisResolutionManifest.java: ########## @@ -57,11 +57,11 @@ public class PolarisResolutionManifest implements PolarisResolutionManifestCatal private final Resolver primaryResolver; private final PolarisDiagnostics diagnostics; - private final Map<Object, Integer> pathLookup = new HashMap<>(); + private final Map<ResolvedPathKey, Integer> pathLookup = new HashMap<>(); Review Comment: Ah, about why "handle" objects are beneficial: the callers can directly obtain the resolved entity from the handle object, no need to create `ResolvedPathKey` objects just for the sake of map lookup. Also, the handle is always directly related to the result on the caller side (local var.), which reduces risk of confusion when an unrelated key is used for lookup. -- 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]
