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/01/28 23:32:32 UTC

[GitHub] [iceberg] aokolnychyi commented on a change in pull request #2179: Spark: Add a test for MERGE modifying a null struct

aokolnychyi commented on a change in pull request #2179:
URL: https://github.com/apache/iceberg/pull/2179#discussion_r566478920



##########
File path: spark/src/test/java/org/apache/iceberg/spark/SparkTestBase.java
##########
@@ -97,11 +97,24 @@ protected long waitUntilAfter(long timestampMillis) {
       return ImmutableList.of();
     }
 
-    return rows.stream()
-        .map(row -> IntStream.range(0, row.size())
-            .mapToObj(pos -> row.isNullAt(pos) ? null : row.get(pos))
-            .toArray(Object[]::new)
-        ).collect(Collectors.toList());
+    return rows.stream().map(this::toJava).collect(Collectors.toList());
+  }
+
+  private Object[] toJava(Row row) {

Review comment:
       I had to rewrite it to support nested structs.




----------------------------------------------------------------
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:
users@infra.apache.org



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