huaxingao opened a new pull request, #5113:
URL: https://github.com/apache/iceberg/pull/5113

   If we have a Predicate `IS_NULL/NOT_NULL` on an optional Struct field, 
`BoundPredicate.toString` throws NPE.
   For example, the following code throws NPE.
   ```
       UnboundPredicate<?> unbound1 = new UnboundPredicate<>(IS_NULL, 
ref("struct"));
       Expression expr1 = unbound1.bind(struct);
       BoundPredicate<?> bound1 = assertAndUnwrap(expr1);
   ```
   This PR fixes the NPE.
   
   I also feel that we probably should not allow predicate on a top column of 
nested column, except `IS_NULL/NOT_NULL`, so I add a check to throw 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]

Reply via email to