rdblue commented on a change in pull request #1421:
URL: https://github.com/apache/iceberg/pull/1421#discussion_r499785513
##########
File path: spark/src/main/java/org/apache/iceberg/spark/SparkDataFile.java
##########
@@ -46,18 +47,38 @@
private final int upperBoundsPosition;
private final int keyMetadataPosition;
private final int splitOffsetsPosition;
+ private final int specIdPosition;
private final Type lowerBoundsType;
private final Type upperBoundsType;
private final Type keyMetadataType;
private final SparkStructLike wrappedPartition;
+ private final Types.StructType partitionStruct;
private Row wrapped;
+ private static final StructLike EMPTY_PARTITION_INFO = new StructLike() {
+ @Override
+ public int size() {
+ return 0;
+ }
+
+ @Override
+ public <T> T get(int pos, Class<T> javaClass) {
+ return null;
Review comment:
If size is 0, then any call to `get` or `set` is invalid. In that case,
I think it is safer to throw an exception here.
----------------------------------------------------------------
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]