shaoyu-li commented on code in PR #13058:
URL: https://github.com/apache/gravitino/pull/13058#discussion_r3985849597


##########
catalogs/catalog-lakehouse-generic/src/main/java/org/apache/gravitino/catalog/lakehouse/generic/GenericCatalogOperations.java:
##########
@@ -367,4 +416,31 @@ private ManagedTableOperations 
configureTableOps(ManagedTableOperations ops) {
 
     return ops;
   }
+
+  /**
+   * Validates the location returned by a {@link TableLocationProvider} before 
it is stored in the
+   * table properties, so that a misbehaving provider fails the table creation 
instead of silently
+   * producing a broken location.
+   *
+   * <p>Only blankness is checked. The shape of the path belongs to the 
provider: nothing downstream
+   * appends to the location, and the value is stored verbatim so that a 
provider unprovisioning it
+   * later sees exactly the string it returned.
+   *
+   * @param location the location returned by the provider
+   * @param providerName the name of the provider that returned it
+   * @param tableIdent the identifier of the table being created
+   * @return the validated location
+   * @throws IllegalArgumentException if the location is blank
+   */
+  @VisibleForTesting
+  static String validateProvisionedLocation(

Review Comment:
   Done in 29a4ea9 -- `validateProvisionedLocation` is gone and its 
`Preconditions.checkArgument` is
   inlined at the call site, and `tableFormatCache()` is above the private 
methods.



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

Reply via email to