alexandre-normand opened a new pull request, #718:
URL: https://github.com/apache/iceberg-go/pull/718

   ![alan](https://media1.tenor.com/m/ywHbbYEidf0AAAAd/hey-groundhog.gif)
   
   This adds support for performing delete operations on a table with the 
addition of `Delete(ctx context.Context, filter iceberg.BooleanExpression, 
snapshotProps iceberg.Properties, opts ...DeleteOption)` on both transaction 
and table (as with the other methods, the table version just wraps creating a 
new transaction, doing the thing and then committing it). 
   
   I did some refactoring to reuse the deletion code from the overwrite 
implementation and also updated the integration tests to make it easier to add 
validation sql statements. I hope people agree that adding a test function in 
`validation.py` that wraps a spark SQL statement to perform the validation is 
less than ideal. To keep the validation SQL closer to the test logic, I 
refactored `validation.py` to have a `sql` argument which allows the 
integration test to run the validation script and pass it the SQL needed to get 
the output used for the assertions. The tradeoff is that some of the 
validations were running two sql statements which makes for two spark sql round 
trips now instead of a single one. However, for most of them, the validation 
was redundant (doing a count and _then_ getting the full rows which implicitly 
also shows the number of rows) so only one test is ending up running two sql 
statements. 
   
   Thanks to @dontirun for contributing the overwrite support in 
https://github.com/apache/iceberg-go/pull/674 which set the foundation to make 
this very easy since the `copy-on-write` deletion is essentially a subset of 
the overwrite with filter. 
   
   


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