rdblue commented on a change in pull request #4011:
URL: https://github.com/apache/iceberg/pull/4011#discussion_r800238563



##########
File path: core/src/main/java/org/apache/iceberg/BaseMetastoreCatalog.java
##########
@@ -238,4 +249,63 @@ protected static String fullTableName(String catalogName, 
TableIdentifier identi
 
     return sb.toString();
   }
+
+  @Override
+  public Table createTable(
+      TableIdentifier identifier,
+      Schema schema,
+      PartitionSpec spec,
+      String location,
+      Map<String, String> properties) {
+    return buildTable(identifier, schema)
+        .withPartitionSpec(spec)
+        .withLocation(location)
+        .withProperties(updateTableProperties(properties))
+        .create();
+  }
+
+  /**
+   * Get default table properties set at Catalog level through catalog 
properties.
+   *
+   * @return default table properties specified in catalog properties
+   */
+  private Map<String, String> tableDefaultProperties() {
+    Map<String, String> props = catalogProps == null ? Collections.emptyMap() 
: catalogProps;
+
+    return props.entrySet().stream()
+        .filter(e -> 
e.getKey().toLowerCase(Locale.ROOT).startsWith(CatalogProperties.TABLE_DEFAULT_PREFIX))

Review comment:
       Why make this case insensitive? I don't think there are other examples 
of table properties being case insensitive.
   
   This is also broken because although this finds properties using a case 
insensitive prefix lookup, removing the prefix is not case insensitive.
   
   I think this should just use `startsWith` and not worry about case 
sensitivity.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to