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


##########
polaris-core/src/main/java/org/apache/polaris/core/entity/CatalogEntity.java:
##########
@@ -27,54 +27,26 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
-import java.util.Optional;
 import java.util.Set;
 import org.apache.iceberg.exceptions.BadRequestException;
 import org.apache.polaris.core.admin.model.AwsStorageConfigInfo;
 import org.apache.polaris.core.admin.model.AzureStorageConfigInfo;
 import org.apache.polaris.core.admin.model.Catalog;
-import org.apache.polaris.core.admin.model.CatalogProperties;
-import org.apache.polaris.core.admin.model.ConnectionConfigInfo;
-import org.apache.polaris.core.admin.model.ExternalCatalog;
 import org.apache.polaris.core.admin.model.FileStorageConfigInfo;
 import org.apache.polaris.core.admin.model.GcpStorageConfigInfo;
-import org.apache.polaris.core.admin.model.PolarisCatalog;
 import org.apache.polaris.core.admin.model.StorageConfigInfo;
 import org.apache.polaris.core.config.BehaviorChangeConfiguration;
 import org.apache.polaris.core.config.RealmConfig;
-import org.apache.polaris.core.connection.ConnectionConfigInfoDpo;
-import org.apache.polaris.core.identity.dpo.ServiceIdentityInfoDpo;
-import org.apache.polaris.core.identity.provider.ServiceIdentityProvider;
-import org.apache.polaris.core.secrets.SecretReference;
 import org.apache.polaris.core.storage.FileStorageConfigurationInfo;
 import org.apache.polaris.core.storage.PolarisStorageConfigurationInfo;
 import org.apache.polaris.core.storage.aws.AwsStorageConfigurationInfo;
 import org.apache.polaris.core.storage.azure.AzureStorageConfigurationInfo;
 import org.apache.polaris.core.storage.gcp.GcpStorageConfigurationInfo;
 
-/**
- * Catalog specific subclass of the {@link PolarisEntity} that handles 
conversion from the {@link
- * Catalog} model to the persistent entity model.
- */
 public class CatalogEntity extends PolarisEntity implements 
LocationBasedEntity {
-  public static final String CATALOG_TYPE_PROPERTY = "catalogType";
 
-  // Specifies the object-store base location used for all Table file 
locations under the
-  // catalog, stored in the "properties" map.
+  public static final String CATALOG_TYPE_PROPERTY = "catalogType";
   public static final String DEFAULT_BASE_LOCATION_KEY = 
"default-base-location";
-
-  /**
-   * Test-only property that specifies a prefix that will be replaced with the 
catalog's
-   * default-base-location whenever it matches a specified new table or view 
location.
-   *
-   * <p>For example, if the catalog base location is 
"s3://my-bucket/base/location" and the prefix
-   * specified here is "file:/tmp" then any new table attempting to specify a 
base location of
-   * "file:/tmp/ns1/ns2/table1" will be translated into
-   * "s3://my-bucket/base/location/ns1/ns2/table1".
-   *
-   * <p><strong>WARNING:</strong> This property is intended for testing 
purposes only and should not
-   * be used in production environments.
-   */

Review Comment:
   I doubt all change in this file are related to the stated purpose of this 
PR. Could you keep only the minimally necessary changes?



##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/io/DefaultFileIOFactory.java:
##########
@@ -60,6 +61,14 @@ public FileIO loadFileIO(
     properties.putAll(storageAccessConfig.extraProperties());
     properties.putAll(storageAccessConfig.internalProperties());
 
+    // Disable AWS SDK trailing checksum validation if explicitly configured
+    String enableTrailingChecksums =
+        properties.getOrDefault("s3.enable-trailing-checksums", "true");
+
+    if (!Boolean.parseBoolean(enableTrailingChecksums)) {
+      properties.put(S3FileIOProperties.CHECKSUM_VALIDATION_ENABLED, "false");

Review Comment:
   This change should not be necessary with the `StorageAccessConfig`-base 
solution.



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