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/02/15 16:47:25 UTC

[GitHub] [iceberg] dungdm93 commented on a change in pull request #4132: [Core][Flink][Spark]: Refactor `TaskWriter` implementations

dungdm93 commented on a change in pull request #4132:
URL: https://github.com/apache/iceberg/pull/4132#discussion_r807049792



##########
File path: core/src/main/java/org/apache/iceberg/io/FileWriter.java
##########
@@ -51,8 +51,9 @@ default void write(Iterable<T> rows) {
    * Writes a row to a predefined spec/partition.
    *
    * @param row a data or delete record
+   * @return PathOffset of written row
    */
-  void write(T row);
+  PathOffset write(T row);

Review comment:
       For a delete, it can have 2 rows in delete files. One for EqualityDelete to delete record in previous snapshot, and one for  PositionDelete to delete record in current snapshot. So it's required to track `PathOffset` of all inserted records in current snapshot.

##########
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:
       Also required




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