RussellSpitzer commented on code in PR #7188:
URL: https://github.com/apache/iceberg/pull/7188#discussion_r1150923313


##########
api/src/main/java/org/apache/iceberg/io/LocationProvider.java:
##########
@@ -28,6 +28,19 @@
  * <p>Implementations must be {@link Serializable} because instances will be 
serialized to tasks.
  */
 public interface LocationProvider extends Serializable {
+
+  /**
+   * Returns the fully-qualified data location for a table, where data files 
such as Parquet, ORC,
+   * or Avro are stored. The table data location can be retrieved from the 
table properties input,
+   * such as 'write.data.path', or from 'write.object-storage.path' 
(deprecated), or from
+   * 'write.folder-storage.path' (deprecated). Refer to the implementation 
class of {@link
+   * LocationProvider} for more details.
+   */
+  default String dataLocation() {
+    throw new UnsupportedOperationException(
+        String.format("%s does not expose dataLocation", 
this.getClass().getCanonicalName()));

Review Comment:
   This breaks old location providers, they just would throw 
UnsupportedOperationException instead of MethodNotFound exceptions.
   
   If we want the method to be backwards compatible it must return a signal 
instead (like null) and the rest of the code should treat that as iff this 
method was not implemented.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to