jackye1995 commented on a change in pull request #3887:
URL: https://github.com/apache/iceberg/pull/3887#discussion_r791069042



##########
File path: 
aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -252,59 +241,32 @@ private static String toTypeString(Type type) {
 
   private static List<Column> toColumns(TableMetadata metadata) {
     List<Column> columns = Lists.newArrayList();
-    Set<NestedField> rootColumnSet = Sets.newHashSet();
-    // Add schema-column fields
+    Set<String> addedNames = Sets.newHashSet();
+
     for (NestedField field : metadata.schema().columns()) {
-      rootColumnSet.add(field);
+      addColumnWithDedupe(columns, addedNames, field, field.name());
+    }
+
+    return columns;
+  }
+
+  private static void addColumnWithDedupe(List<Column> columns, Set<String> 
dedupe,
+                                          NestedField field, String fieldName) 
{

Review comment:
       the `fieldName` parameter is not necessary, it's always `field.name()`




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