szehon-ho commented on code in PR #4546:
URL: https://github.com/apache/iceberg/pull/4546#discussion_r856561546


##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java:
##########
@@ -433,6 +439,43 @@ void setSnapshotSummary(Map<String, String> parameters, 
Snapshot currentSnapshot
     }
   }
 
+  private void setSchema(TableMetadata metadata, Map<String, String> 
parameters) {
+    parameters.remove(TableProperties.CURRENT_SCHEMA);
+    if (metadata.schema() != null) {

Review Comment:
   Lets' have common method and re-use to set various fields like
   ```
   private void setField(TableMetadata metadata, Map<String, String> 
parameters, String key, String value) {
      parameters.remove(key);
      if (value.length <= maxHiveTablepropertySize) {
         parameters.put(key, value);
      } else {
         LOG.warn("Not exposing {} in HMS since it exceeds {} characters", 
maxHiveTablePropertySize);
      }
   }
   ```



##########
core/src/main/java/org/apache/iceberg/TableProperties.java:
##########
@@ -75,6 +75,20 @@ private TableProperties() {
    */
   public static final String CURRENT_SNAPSHOT_TIMESTAMP = 
"current-snapshot-timestamp-ms";
 
+  /**
+   * Reserved table property for default partition spec.
+   * <p>
+   * This reserved property is used to store the default partition spec.
+   */
+  public static final String DEFAULT_PARTITION_SPEC = "default-partition-spec";

Review Comment:
   I think you reverted too many?  Should be 'current'.



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