nmshr opened a new pull request, #3557:
URL: https://github.com/apache/iceberg-python/pull/3557

   ## Context
   
   The intention of this PR is to shed light on a potential issue.
   It is meant as an inquiry to understand what the maintainers feel about this 
scenario.
   This is perhaps an edge case, so feel free to prioritise it in accordance.
   
   ## Observation
   
   When executing `update_statistics` on a table, there are two methods which 
can be chained by design: `set_statistics` and `remove_statistics`.
   
   `set_statistics` appends to `_updates` using `+=` (line 56).
   `remove_statistics` replaces `_updates` using `=` (line 65).
   
   When chaining both, `remove_statistics` drops all preceding `set_statistics` 
calls. This may lead to the query engine scanning more data in the absence of 
the required statistics files.
   
   See `pyiceberg/table/update/statistics.py`, lines 56 and 65.
   
   ## AI Use Disclaimer
   
   I used claude code to understand test coverage and discover improvement 
opportunities. I used
   claude code to verify that the test adds value and is not going to be a 
waste of time for the reviwers. I did not use claude code to write any code, 
commit messages or descriptions, all writing, including this, is my own.


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