chenjunjiedada commented on a change in pull request #1517:
URL: https://github.com/apache/iceberg/pull/1517#discussion_r503291367
##########
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:
OK, I added `TestHelpers` to contain `getRows` and `getRowData`.
----------------------------------------------------------------
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]