diqiu50 commented on code in PR #10738:
URL: https://github.com/apache/gravitino/pull/10738#discussion_r3094385211
##########
core/src/main/java/org/apache/gravitino/catalog/SchemaOperationDispatcher.java:
##########
@@ -148,6 +152,9 @@ public Schema createSchema(NameIdentifier ident, String
comment, Map<String, Str
.withId(uid)
.withName(ident.name())
.withNamespace(ident.namespace())
+ .withProperties(
+ ImmutableMap.of(
+ SCHEMA_CREATED_BY_GRAVITINO,
SCHEMA_CREATED_BY_GRAVITINO_VALUE))
Review Comment:
Good catch. We've reworked the approach to avoid storing anything in the
entity store. Instead, `containsUserCreatedSchemas` now calls `loadSchema` for
each schema and checks `StringIdentifier.fromProperties(schema.properties())` —
schemas created via Gravitino carry the identifier, imported ones do not.
One edge case: backends that cannot store a `StringIdentifier` (e.g., MySQL)
return null properties, making it impossible to distinguish user-created from
imported schemas. In that case, `dropCatalog(force=false)` has no meaningful
semantic, so we suggest logging a warning instead of throwing
`NonEmptyCatalogException`. WDYT?
--
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]