amogh-jahagirdar commented on code in PR #11199:
URL: https://github.com/apache/iceberg/pull/11199#discussion_r1777434631


##########
core/src/main/java/org/apache/iceberg/util/ContentFileUtil.java:
##########
@@ -49,7 +50,21 @@ public static <F extends ContentFile<K>, K> K copy(
     }
   }
 
+  /**
+   * @deprecated since 1.7.0, will be removed in 2.0.0; use {@link
+   *     #referencedDataFileLocation(DeleteFile)} instead.
+   */
+  @Deprecated
   public static CharSequence referencedDataFile(DeleteFile deleteFile) {
+    return referencedLocation(deleteFile);
+  }
+
+  public static String referencedDataFileLocation(DeleteFile deleteFile) {
+    CharBuffer location = referencedLocation(deleteFile);
+    return location != null ? location.toString() : null;
+  }
+
+  private static <T> T referencedLocation(DeleteFile deleteFile) {

Review Comment:
   Good point, no not really. Just how I refactored it, in my head I was just 
isolating the extraction of the location to a separate method. Since there's no 
real  value add (re-ran benchmarking just to be sure), we may as well make the 
change more minimal.



##########
core/src/main/java/org/apache/iceberg/util/ContentFileUtil.java:
##########
@@ -49,7 +50,21 @@ public static <F extends ContentFile<K>, K> K copy(
     }
   }
 
+  /**
+   * @deprecated since 1.7.0, will be removed in 2.0.0; use {@link

Review Comment:
   I thought about this a bit more,  I originally deprecated it because I did 
think there's no need to have both methods. However, after more thought I think 
it makes sense to not deprecate for now since it isn't super obvious (at least 
to me) we will never need this.
   
    If at a certain point we realize it really isn't needed we can easily 
deprecate at that point (especially since it's in core like @nastra mentioned). 
However, if we deprecate and realize we need it in some cases then we're in an 
awkward state. 



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

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