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



##########
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:
       This looks suspicious to me. It is generally a bad idea to hide code 
errors by making calls succeed when they should not. Why would `get` be called 
on a projection that is not wrapping a struct?




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