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



##########
File path: api/src/main/java/org/apache/iceberg/util/StructProjection.java
##########
@@ -155,6 +155,10 @@ public int size() {
 
   @Override
   public <T> T get(int pos, Class<T> javaClass) {
+    if (struct == null) {
+      return null;

Review comment:
       Thanks for the explanation and pointing out the comment from openinx.
   
   Does this possibly merit a comment? It does at first look suspicious to me 
as well.
   
   Maybe something as simple as `Allow returning a null struct to handle cases 
where users project onto a nested required field of a struct that is optional`? 
However, I'd leave that up to @rdblue or others whether this merits a comment 
or not. 




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