YinZheng-Sun commented on code in PR #956:
URL: https://github.com/apache/iceberg-cpp/pull/956#discussion_r4228138190


##########
src/iceberg/expression/predicate.cc:
##########
@@ -247,6 +249,19 @@ bool IsFloatingType(TypeId type) {
   return type == TypeId::kFloat || type == TypeId::kDouble;
 }
 
+bool AllAncestorsRequired(const StructType& struct_type, const BoundReference& 
ref) {

Review Comment:
   A required nested field can still be null when an ancestor struct is null. 
Previously, binding checked only the term’s nullability, which could 
incorrectly fold IS NULL to false and NOT NULL to true, causing row-group 
pruning to discard matching rows.
   
   Only fold null predicates when the term cannot produce null and all ancestor 
fields are required.
   Preserve constant folding for fully required paths.
   Add regression coverage for nullable parents and grandparents, transformed 
terms, and row-group pruning with null predicates and their negations.



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