mchades commented on code in PR #13506:
URL: https://github.com/apache/gravitino/pull/13506#discussion_r4356066574
##########
catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/TestFilesetCatalogOperations.java:
##########
@@ -1047,6 +1048,219 @@ public void testCreateFilesetWithExceptions() throws
IOException {
}
}
+ /** Checks that managed filesets reject existing data without registering
metadata. */
Review Comment:
Added coverage for catalog/schema-derived locations and schema/fileset
placeholders over existing data, including explicit adoption. Added rejection
tests for setting/removing the property through the alter validator, plus
true-case variants and false/invalid values.
##########
api/src/main/java/org/apache/gravitino/file/Fileset.java:
##########
@@ -71,6 +71,13 @@ public interface Fileset extends Auditable {
/** The property name for the default location name of the fileset. */
String PROPERTY_DEFAULT_LOCATION_NAME = "default-location-name";
+ /**
+ * The property name that allows creating a managed fileset on a location
that already exists and
+ * is not empty. Defaults to false, in which case such a location must be
registered as an
+ * external fileset instead.
+ */
+ String PROPERTY_ALLOW_EXISTING_LOCATION_AS_MANAGED =
"allow-existing-location-as-managed";
+
Review Comment:
Added the Python constant. Keeping the existing boolean decoding semantics:
only case-insensitive `true` opts in; `false`, `yes`, `1`, and other values
fail closed. The new tests cover these cases. Strict parsing would be a
separate behavior change.
--
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]