You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/12/10 18:12:39 UTC

[GitHub] [iceberg] kbendick commented on a change in pull request #3477: Flink: Add tests to check whether should remove meta columns in source reader

kbendick commented on a change in pull request #3477:
URL: https://github.com/apache/iceberg/pull/3477#discussion_r766884362



##########
File path: flink/v1.12/flink/src/test/java/org/apache/iceberg/flink/TestHelpers.java
##########
@@ -73,19 +74,23 @@ public static RowData copyRowData(RowData from, RowType rowType) {
     return RowDataUtil.clone(from, null, rowType, fieldSerializers);
   }
 
-  public static List<RowData> readRowData(FlinkInputFormat inputFormat, RowType rowType) throws IOException {
-    FlinkInputSplit[] splits = inputFormat.createInputSplits(0);
-    List<RowData> results = Lists.newArrayList();
-
-    for (FlinkInputSplit s : splits) {
-      inputFormat.open(s);
-      while (!inputFormat.reachedEnd()) {
-        RowData row = inputFormat.nextRecord(null);
-        results.add(copyRowData(row, rowType));
+  public static void readRowData(FlinkInputFormat input, Consumer<RowData> visitor) throws IOException {
+    for (FlinkInputSplit s : input.createInputSplits(0)) {
+      input.open(s);
+      try {
+        while (!input.reachedEnd()) {
+          RowData row = input.nextRecord(null);

Review comment:
       Nit: This is a new addition, but can we add an in-line column on the `null` to indicate that it's `reuse` like `/** resuse **/`? I always forget.




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org