amogh-jahagirdar commented on code in PR #10123:
URL: https://github.com/apache/iceberg/pull/10123#discussion_r1562797279


##########
core/src/main/java/org/apache/iceberg/BaseRowDelta.java:
##########
@@ -43,6 +43,10 @@ protected BaseRowDelta self() {
 
   @Override
   protected String operation() {
+    if (!addsDataFiles() && addsDeleteFiles()) {

Review Comment:
   Unless you're just saying we'd do RewriteFiles in a separate PR? which I'm 
good with.



##########
core/src/main/java/org/apache/iceberg/BaseRowDelta.java:
##########
@@ -43,6 +43,10 @@ protected BaseRowDelta self() {
 
   @Override
   protected String operation() {
+    if (!addsDataFiles() && addsDeleteFiles()) {

Review Comment:
   Ah true, but doesn't the same principle apply for `RewriteFiles` then? I 
think technically someone can use RewriteFiles to perform just a delete. 
   
   `table.newRewrite().deleteFile(file))`
   
   It's awkward since they could just do a deleteFile but I think it's still 
possible, and we'd still want to produce the right operation instead of a 
`REPLACE`. It seems like we should have a check in RewriteFiles as well.
   
   



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to