rdblue commented on a change in pull request #3048:
URL: https://github.com/apache/iceberg/pull/3048#discussion_r698061391
##########
File path:
aws/src/main/java/org/apache/iceberg/aws/glue/IcebergToGlueConverter.java
##########
@@ -132,4 +138,61 @@ static void validateTableIdentifier(TableIdentifier
tableIdentifier) {
validateNamespace(tableIdentifier.namespace());
validateTableName(tableIdentifier.name());
}
+
+ static List<Column> toColumns(Schema schema) {
+ return schema.columns().stream()
+ .map(field -> Column.builder()
+ .name(field.name())
+ .type(toTypeString(field.type()))
+ .comment(field.doc())
+ .build())
+ .collect(Collectors.toList());
+ }
+
+ private static String toTypeString(Type type) {
Review comment:
This looks really similar to the conversion in `HiveSchemaUtil`. Is it
possible to share that?
--
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]