collado-mike commented on code in PR #465:
URL: https://github.com/apache/polaris/pull/465#discussion_r1867106093


##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/PolarisResolvedPathWrapper.java:
##########
@@ -19,62 +19,41 @@
 package org.apache.polaris.core.persistence;
 
 import java.util.List;
-import java.util.stream.Collectors;
 import org.apache.polaris.core.entity.PolarisEntity;
 
 /**
  * Holds fully-resolved path of PolarisEntities representing the targetEntity 
with all its grants
  * and grant records.
  */
 public class PolarisResolvedPathWrapper {
-  private final List<ResolvedPolarisEntity> resolvedPath;
+  private final List<PolarisEntity> resolvedPath;
 
   // TODO: Distinguish between whether parentPath had a null in the chain or 
whether only
   // the leaf element was null.
-  public PolarisResolvedPathWrapper(List<ResolvedPolarisEntity> resolvedPath) {
+  public PolarisResolvedPathWrapper(List<PolarisEntity> resolvedPath) {
     this.resolvedPath = resolvedPath;
   }
 
-  public ResolvedPolarisEntity getResolvedLeafEntity() {
+  public PolarisEntity getResolvedLeafEntity() {
     if (resolvedPath == null || resolvedPath.isEmpty()) {
       return null;
     }
     return resolvedPath.get(resolvedPath.size() - 1);
   }
 
   public PolarisEntity getRawLeafEntity() {
-    ResolvedPolarisEntity resolvedEntity = getResolvedLeafEntity();
-    if (resolvedEntity != null) {
-      return resolvedEntity.getEntity();
-    }
-    return null;
-  }
-
-  public List<ResolvedPolarisEntity> getResolvedFullPath() {
-    return resolvedPath;
+    return getResolvedLeafEntity();
   }
 
   public List<PolarisEntity> getRawFullPath() {
-    if (resolvedPath == null) {
-      return null;
-    }
-    return 
resolvedPath.stream().map(ResolvedPolarisEntity::getEntity).collect(Collectors.toList());
-  }
-
-  public List<ResolvedPolarisEntity> getResolvedParentPath() {
-    if (resolvedPath == null) {
-      return null;
-    }
-    return resolvedPath.subList(0, resolvedPath.size() - 1);
+    return resolvedPath;

Review Comment:
   We're eliminating the `ResolvedPolarisEntity` type and just using 
`PolarisEntity` types everywhere. 



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