Anurag-S1ngh opened a new pull request, #4513:
URL: https://github.com/apache/iceberg-python/pull/4513

   # Rationale for this change
   
   Closes #4067.
   
   `IsNull` and `NotNull` folded a required field to `AlwaysFalse` and 
`AlwaysTrue` using only the leaf field's `required` flag. A required leaf can 
still be absent when an ancestor struct is null, so a scan could prune every 
file and return no rows.
   
   The fold now happens at bind time and only when the field and every ancestor 
on its path to the root are required. `BoundIsNull` and `BoundNotNull` no 
longer fold on direct construction.
   
   ## Are these changes tested?
   
   Yes. Added coverage for the schema path check, for binding a required leaf 
under an optional ancestor and a required ancestor, and for direct construction 
not folding. Also added a scan regression test that appends a null optional 
struct with a required child and checks that `IsNull("s.x")` keeps the file and 
`NotNull("s.x")` returns no rows.
   
   - `tests/test_schema.py tests/expressions`: 965 passed
   - `tests/io/test_pyarrow.py -m unit`: 267 passed, 1 skipped
   - `tests/table/test_init.py -m unit`: 184 passed
   
   ## Are there any user-facing changes?
   
   No API changes. Scans that filter on a required field under an optional 
ancestor now return the correct rows instead of no rows.
   


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