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/17 09:56:32 UTC

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

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



##########
File path: api/src/main/java/org/apache/iceberg/PartitionKey.java
##########
@@ -98,11 +98,12 @@ public String toPath() {
    * @param row a StructLike row
    */
   @SuppressWarnings("unchecked")
-  public void partition(StructLike row) {
+  public PartitionKey partition(StructLike row) {

Review comment:
       I'm think this will produce an api compatibility issue,  why do we need to change this basic API ?

##########
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:
       You mean each abstracted FileWriter will get a `PathOffset` back when append a newly row ? That does not make sense for me because not every writer need this PathOffset to do the following thing.




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