nikhilindikuzha opened a new issue, #12710:
URL: https://github.com/apache/iceberg/issues/12710

   ### Query engine
   
   Spark
   
   ### Question
   
   I have created a iceberg table in version 2 with MOR statergy with one 
column as partition.
   Using merge command i have inserted 3 records on day 1 partition.
   Now I could see in day 1 partition 1 data file came.
   After that , I have deleted one record from the day 1 partition using Merge 
into statement.
   Now in day 1 partition 1 data file along with 1 *-delete.parquet file came. 
This delete file has reference to the above data file.
   Now I wanted to move the data file to another location and update the 
metadata.
   Incase of COW - I am able to perform the same via 
table.newRewrite.rewriteFiles(datafile, newdatafile) - it updates the metadata 
also.
   But in case of MOR - getting error as
      org.apache.iceberg.exceptions.ValidationExceptions : Missing required 
files to delete : file : <my data file path >
   Tried with RewriteFiles rewriteFiles(
         Set<DataFile> dataFilesToReplace,
         Set<DeleteFile> deleteFilesToReplace,
         Set<DataFile> dataFilesToAdd,
         Set<DeleteFile> deleteFilesToAdd);
   
https://github.com/apache/iceberg/blob/main/api/src/main/java/org/apache/iceberg/RewriteFiles.java
 (edited) 


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