wombatu-kun commented on code in PR #16746:
URL: https://github.com/apache/iceberg/pull/16746#discussion_r3408234684


##########
aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java:
##########
@@ -378,13 +379,28 @@ private static void addColumnWithDedupe(
                       ICEBERG_FIELD_CURRENT, Boolean.toString(isCurrent)));
 
       if (field.doc() != null && !field.doc().isEmpty()) {
-        builder.comment(field.doc());
+        builder.comment(truncateColumnComment(field.doc()));
       } else if (existingColumnMap != null && 
existingColumnMap.containsKey(field.name())) {
-        builder.comment(existingColumnMap.get(field.name()));
+        
builder.comment(truncateColumnComment(existingColumnMap.get(field.name())));
       }
 
       columns.add(builder.build());
       dedupe.add(field.name());
     }
   }
+
+  private static String truncateColumnComment(String comment) {
+    if (comment == null) {

Review Comment:
   Both callers of this helper pass a value already proven non-null: one branch 
is guarded by `field.doc() != null`, and the other reads from 
`existingColumnMap`, which is built by filtering out null comments and is 
accessed behind a `containsKey` check. This `comment == null` branch is 
therefore unreachable and can be dropped.



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