You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/03/08 04:35:11 UTC

[GitHub] [iceberg] openinx commented on a change in pull request #4264: Flink: Refactor to use the BaseEqualityDeltaWriter.

openinx commented on a change in pull request #4264:
URL: https://github.com/apache/iceberg/pull/4264#discussion_r821313407



##########
File path: core/src/main/java/org/apache/iceberg/io/PartitioningWriter.java
##########
@@ -46,7 +46,7 @@
    * @param spec a partition spec
    * @param partition a partition or null if the spec is unpartitioned
    */
-  void write(T row, PartitionSpec spec, StructLike partition);
+  PathOffset write(T row, PartitionSpec spec, StructLike partition);

Review comment:
       As the `PartitioningWriter` will have multiple partition writers in its internal implementation,  so we can not just introduce the two methods in this interface: 
   
   ```java
     /**
      * Returns the file path that are currently opened.
      *
      * @return the current file path.
      */
     CharSequence location();
   
     /**
      * Returns the row offset that are currently writing, starting from 0.
      *
      * @return the current row offset.
      */
     long rowOffset();
   ```
   
   Because those `location()` and `rowOffset()` are binded to specific writers. In theory, different writers should have different `location()` and `rowOffset()`.  So here we add a return value `PathOffset` here to get the latest wrote path & offset for the wrote row.




-- 
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-unsubscribe@iceberg.apache.org

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



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