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

   <!--
   Thanks for opening a pull request!
   -->
   
   <!-- In the case this PR will resolve an issue, please replace 
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
   <!-- Closes #${GITHUB_ISSUE_ID} -->
   Closes #2558 
   
   # Rationale for this change
   When removing snapshots with statistics, `RemoveStatisticsUpdate` was being 
instantiated with a positional argument, which, as suggested by @vndv, 
"violates Pydantic's BaseModel requirement that all fields be passed as keyword 
arguments".  Shout out to @vndv for catching this 🚀 
   
   This caused a `TypeError: BaseModel.__init__() takes 1 positional argument 
but 2 were given` when calling 
`table.maintenance.expire_snapshots().older_than(...).commit()`.
   
   ## Are these changes tested?
   Yes, and a new test was added.
   
   Existing tests only tested the `RemoveStatisticsUpdate` directly, but didnt 
test the code path through `RemoveSnapshotsUpdate` that triggers the bug.  
   
   Added `test_update_remove_snapshots_with_statistics` to 
`test_expire_snapshots.py` to extend coverage for the condition.
   
   ## Are there any user-facing changes?
   No.
   <!-- In the case of user-facing changes, please add the changelog label. -->


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