sfc-gh-mansingh commented on code in PR #1037:
URL: https://github.com/apache/polaris/pull/1037#discussion_r2014798044
##########
service/common/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalogHandlerWrapper.java:
##########
@@ -771,15 +810,113 @@ public boolean sendNotification(TableIdentifier
identifier, NotificationRequest
&& notificationCatalog.sendNotification(identifier, request);
}
+ /**
+ * Fetch the metastore table entity for the given table identifier
+ *
+ * @param tableIdentifier The identifier of the table
+ * @return the Polaris table entity for the table
+ */
+ private IcebergTableLikeEntity getTableEntity(TableIdentifier
tableIdentifier) {
+ PolarisResolvedPathWrapper target =
+ resolutionManifest.getPassthroughResolvedPath(tableIdentifier);
+
+ return IcebergTableLikeEntity.of(target.getRawLeafEntity());
+ }
+
+ /**
+ * Hashes the provided metadata file location
+ *
+ * @param metadataFileLocation
+ * @return the hashed metadata file location
+ */
+ private String hashMetadataFileLocation(String metadataFileLocation) {
+ return DigestUtils.sha256Hex(metadataFileLocation);
+ }
+
+ /**
+ * Generate an ETag from a {@link LoadTableResponse}
+ *
+ * @param loadTableResponse the response for the operation
+ * @return the generated ETag
+ */
+ private String generateETagValueForResponse(LoadTableResponse
loadTableResponse) {
+ return
generateETagForMetadataFileLocation(loadTableResponse.metadataLocation());
+ }
+
+ /**
+ * Generate an ETag from a {@link IcebergTableLikeEntity}. Useful when it is
desired to generate
+ * an ETag without loading the entire metadata from storage.
+ *
+ * @param tableEntity the entity to use to generate the ETag
+ * @return the generated ETag
+ */
+ private String generateETagValueForTableEntity(IcebergTableLikeEntity
tableEntity) {
Review Comment:
I have removed it 👍
--
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]