roryqi commented on code in PR #13771:
URL: https://github.com/apache/gravitino/pull/13771#discussion_r4254918790


##########
core/src/main/java/org/apache/gravitino/catalog/TopicOperationDispatcher.java:
##########
@@ -309,11 +320,24 @@ private void importTopic(NameIdentifier identifier) {
             .build();
 
     try {
-      store.put(topicEntity, true);
+      // Never overwrite imported topic metadata because the stable ID may be 
owned by another
+      // Gravitino path.
+      store.put(topicEntity, false);

Review Comment:
   Thanks for pointing this out. Kafka does not persist a removable Gravitino 
identifier; the entity ID is deterministically derived from Kafka's immutable 
topic UUID on every load. I restored the Kafka-specific overwrite path so 
catalog re-registration can rebind that UUID to the current Gravitino path, and 
added an inline comment explaining why this is safe (Kafka topics cannot be 
renamed, and recreating a topic produces a new UUID). The test now explicitly 
verifies store.put(..., true).



##########
catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/IcebergCatalogCapability.java:
##########
@@ -48,6 +60,21 @@ public CapabilityResult supportsHierarchicalSchema() {
     return CapabilityResult.SUPPORTED;
   }
 
+  @Override
+  public CapabilityResult caseSensitiveOnName(Scope scope) {
+    if (hiveBackend) {
+      switch (scope) {
+        case SCHEMA:
+        case TABLE:

Review Comment:
   Agreed. I removed the Iceberg backend-specific caseSensitiveOnName override 
entirely, so existing mixed-case schema and table registrations retain their 
current behavior.



##########
catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/IcebergCatalogCapability.java:
##########
@@ -48,6 +60,21 @@ public CapabilityResult supportsHierarchicalSchema() {
     return CapabilityResult.SUPPORTED;
   }
 
+  @Override
+  public CapabilityResult caseSensitiveOnName(Scope scope) {
+    if (hiveBackend) {
+      switch (scope) {
+        case SCHEMA:
+        case TABLE:
+        case COLUMN:

Review Comment:
   Agreed. The Iceberg COLUMN case normalization has also been removed together 
with the entire caseSensitiveOnName override. Column lookup and mutation 
semantics are unchanged by this PR.



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