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

   ### Query engine
   
   Java API
   
   ### Question
   
   I am trying to implement an Iceberg writer based completely on Java API. I 
am able to use the PartitionedFanoutWriter to write to the specified partitions 
successfully. 
   
   However, now I need to implement deletes, and there lies the issue. Equality 
or Position deletes seem to be the best solution for my use case as I don't 
want to rewrite the existing files again. 
   
   As I looked through the classes and tried to create my own 
PartitionedFanoutWriter for deletes, I noticed that the constructor function is 
not public. Any reasons for this and is there an alternate solution to this 
problem? Any help would be appreciated. Thanks.
   
   ```
   // org.apache.iceberg.io.BaseTaskWriter
   
   protected class RollingEqDeleteWriter extends 
BaseTaskWriter<T>.BaseRollingWriter<EqualityDeleteWriter<T>> {
   
           // This is not public unlike RollingFileWriter 
-------------------------------
   
           RollingEqDeleteWriter(StructLike partitionKey) {
               super(partitionKey, null);
           }
   
           EqualityDeleteWriter<T> newWriter(EncryptedOutputFile file, 
StructLike partitionKey) {
               return 
BaseTaskWriter.this.appenderFactory.newEqDeleteWriter(file, 
BaseTaskWriter.this.format, partitionKey);
           }
   
           long length(EqualityDeleteWriter<T> writer) {
               return writer.length();
           }
   
           void write(EqualityDeleteWriter<T> writer, T record) {
               writer.write(record);
           }
   
           void complete(EqualityDeleteWriter<T> closedWriter) {
               
BaseTaskWriter.this.completedDeleteFiles.add(closedWriter.toDeleteFile());
           }
       }
   ```


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