stevenzwu commented on code in PR #7517:
URL: https://github.com/apache/iceberg/pull/7517#discussion_r1189241221


##########
api/src/main/java/org/apache/iceberg/util/StructProjection.java:
##########
@@ -174,6 +174,7 @@ private StructProjection(StructType structType, StructType 
projection, boolean a
   }
 
   public StructProjection wrap(StructLike newStruct) {
+    Preconditions.checkState(newStruct != null, "Invalid root struct for 
wrapping: null");

Review Comment:
   @rdblue you are saying wrapping a null root struct should be allowed (not 
throwing exception), right?
   
   ```
   StructProjection projection = StructProjection.create(schema, 
projectedSchema);
   projection.wrap(null); // allowed
   ```



-- 
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]

Reply via email to