rdblue commented on a change in pull request #2829:
URL: https://github.com/apache/iceberg/pull/2829#discussion_r705564261
##########
File path:
spark/src/main/java/org/apache/iceberg/spark/actions/BaseRewriteDataFilesSparkAction.java
##########
@@ -383,4 +408,31 @@ public int totalGroupCount() {
return totalGroupCount;
}
}
+
+ static class EmptyStruct implements StructLike {
+
+ private static EmptyStruct instance;
+
+ static EmptyStruct instance() {
+ if (instance == null) {
+ instance = new EmptyStruct();
+ }
+ return instance;
+ }
+
+ @Override
+ public int size() {
+ return 0;
+ }
+
+ @Override
+ public <T> T get(int pos, Class<T> javaClass) {
+ return null;
+ }
+
+ @Override
+ public <T> void set(int pos, T value) {
+
Review comment:
Should this throw an exception because you're trying to write to a slot
that doesn't exist?
##########
File path:
spark/src/main/java/org/apache/iceberg/spark/actions/BaseRewriteDataFilesSparkAction.java
##########
@@ -383,4 +408,31 @@ public int totalGroupCount() {
return totalGroupCount;
}
}
+
+ static class EmptyStruct implements StructLike {
+
+ private static EmptyStruct instance;
+
+ static EmptyStruct instance() {
+ if (instance == null) {
+ instance = new EmptyStruct();
+ }
+ return instance;
+ }
+
+ @Override
+ public int size() {
+ return 0;
+ }
+
+ @Override
+ public <T> T get(int pos, Class<T> javaClass) {
+ return null;
Review comment:
Should this throw an exception?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]