openinx commented on a change in pull request #1174:
URL: https://github.com/apache/iceberg/pull/1174#discussion_r452119193



##########
File path: flink/src/test/java/org/apache/iceberg/flink/TestFlinkSchemaUtil.java
##########
@@ -218,6 +218,24 @@ public void testListField() {
             ))
     );
 
-    Assert.assertEquals(expectedSchema.asStruct(), actualSchema.asStruct());
+    checkSchema(flinkSchema, icebergSchema);
+  }
+
+  private void checkSchema(TableSchema flinkSchema, Schema icebergSchema) {
+    Assert.assertEquals(icebergSchema.asStruct(), 
FlinkSchemaUtil.convert(flinkSchema).asStruct());
+    // The conversion is not a 1:1 mapping, so we just check iceberg types.
+    Assert.assertEquals(
+        icebergSchema.asStruct(),
+        
FlinkSchemaUtil.convert(FlinkSchemaUtil.toSchema(FlinkSchemaUtil.convert(icebergSchema))).asStruct());

Review comment:
       I'd prefer to provide some separate unit tests to address the conversion 
differences ( so that we won't regress).




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

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