superdiaodiao commented on PR #17464:
URL: https://github.com/apache/iceberg/pull/17464#issuecomment-5190117212

   Added the table-side integration test in 639bd29 - thanks for the push, it's 
a better guard than the stub alone.
   
   
`TestHiveCommits.testThriftExceptionUnknownStateOnCreateCommitWhenTableNeverPersisted`
 drives a failed create through the real `HiveTableOperations` (spied 
`persistTable` throwing `TException`) and pins the wiring the stub could not: 
`refresh()` yields null metadata for a never-persisted table, and 
`checkCurrentMetadataLocation` resolves to false instead of NPE-ing. It fails 
on `main` without the fix. Together with the view test from the previous round, 
both `doRefresh` paths are now covered end-to-end, so a future refactor of 
either would break a test rather than silently reintroduce the NPE.
   
   I kept `TestBaseMetastoreTableOperations` as well - it pins the 
catalog-agnostic contract (the guard lives in `BaseMetastoreTableOperations`, 
so any metastore catalog whose `doRefresh` can leave metadata null benefits), 
while the two Hive tests cover the concrete wiring. Happy to drop it if you'd 
rather not carry both.


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