rangareddy commented on code in PR #19488:
URL: https://github.com/apache/hudi/pull/19488#discussion_r3709859239


##########
hudi-aws/src/main/java/org/apache/hudi/aws/sync/AWSGlueCatalogSyncClient.java:
##########
@@ -474,11 +475,30 @@ public boolean updateTableProperties(String tableName, 
Map<String, String> table
     }
   }
 
-  private void setComments(List<Column> columns, Map<String, Option<String>> 
commentsMap) {
-    columns.forEach(column -> {
-      String comment = commentsMap.getOrDefault(column.name(), 
Option.empty()).orElse(null);
-      Column.builder().comment(comment).build();
-    });
+  /**
+   * Returns {@code columns} with the comment of every column the storage 
schema knows about replaced by the
+   * one the schema carries, clearing it when the schema has none.
+   *
+   * <p>Columns the schema says nothing about are left untouched rather than 
cleared. The pre-SDK-v2 code

Review Comment:
   Applied — you are right that it dates badly, and the behaviour is the 
load-bearing part anyway:
   
   ```java
   * <p>Columns the schema says nothing about are left untouched rather than 
cleared. The pre-SDK-v2 code
   * cleared them, but only nominally: it built a {@code Column} and discarded 
it, so no comment was ever
   * applied and nothing can depend on that behaviour. Clearing is also the 
more dangerous reading - the
   * storage field names keep the Avro schema case while a catalog may hold 
them lowercased, and a name
   * that fails to match would silently wipe a comment.
   ```
   
   "only nominally" plus the discarded-Column detail says why nothing depends 
on it without reference to a date, which is what the elapsed-time phrasing was 
standing in for.



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