diqiu50 commented on code in PR #12555:
URL: https://github.com/apache/gravitino/pull/12555#discussion_r3892081003


##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/catalog/iceberg/IcebergCatalogPropertyConverter.java:
##########
@@ -152,6 +246,99 @@ private Map<String, String> 
buildJDBCBackendProperties(Map<String, String> prope
     return jdbcProperties;
   }
 
+  private void warnOnReservedOverrides(GravitinoCatalog catalog, Map<String, 
String> config) {
+    for (String reserved : RESERVED_REST_PROPERTIES) {
+      if (config.containsKey(reserved)) {
+        LOG.info(
+            "Property '{}' set on catalog '{}' is ignored; the connector 
always derives it when "
+                + "routing through the Iceberg REST server.",
+            reserved,
+            catalog.getName());
+      }
+    }
+  }
+
+  /**
+   * Derives the Trino file system config from the catalog's warehouse 
location. Vended credentials
+   * are only consumed by Trino's native file systems, so the native 
implementation matching the
+   * warehouse scheme has to be enabled.
+   */
+  private Map<String, String> buildStorageProperties(Map<String, String> 
properties) {
+    Map<String, String> storageProperties = new HashMap<>();
+    // Always available as the fallback; where a native file system is also 
enabled below, that one
+    // takes precedence for its own scheme.
+    storageProperties.put(TRINO_FS_HADOOP_ENABLED, "true");
+
+    String warehouse = properties.get(IcebergConstants.WAREHOUSE);

Review Comment:
   I think determining which filesystem to enable based on the URI scheme is 
enough.
   We can add the integration test in the next PR.



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