rdblue commented on a change in pull request #1517:
URL: https://github.com/apache/iceberg/pull/1517#discussion_r502835683



##########
File path: 
flink/src/test/java/org/apache/iceberg/flink/source/TestFlinkInputFormat.java
##########
@@ -104,6 +105,22 @@ public void testNestedProjection() throws Exception {
   }
 
   private List<Row> runFormat(FlinkInputFormat inputFormat) throws IOException 
{
+    return getRows(inputFormat);
+  }
+
+  public static List<RowData> getRowData(FlinkInputFormat inputFormat) throws 
IOException {
+    RowType rowType = FlinkSchemaUtil.convert(inputFormat.projectedSchema());
+
+    DataStructureConverter<Object, Object> converter = 
DataStructureConverters.getConverter(
+        TypeConversions.fromLogicalToDataType(rowType));
+
+    return getRows(inputFormat).stream()
+        .map(converter::toInternal)
+        .map(RowData.class::cast)
+        .collect(Collectors.toList());
+  }
+
+  public static List<Row> getRows(FlinkInputFormat inputFormat) throws 
IOException {

Review comment:
       I think it is a bad practice to make helper methods in one test suite 
public and use them in another suite. Instead, helper methods should be moved 
to an appropriate test utility class. That way, we don't have test utility code 
that is hard to find because it lives in whatever test was written first.




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