Add test for UpdateStatistics chaining set and remove#3557
Open
nmshr wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_statisticson a table, there are two methods which can be chained by design:set_statisticsandremove_statistics.set_statisticsappends to_updatesusing+=(line 56).remove_statisticsreplaces_updatesusing=(line 65).When chaining both,
remove_statisticsdrops all precedingset_statisticscalls. 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.