mchades commented on code in PR #13571:
URL: https://github.com/apache/gravitino/pull/13571#discussion_r4215797061


##########
core/src/main/java/org/apache/gravitino/catalog/SemanticModelDispatcher.java:
##########
@@ -18,7 +18,42 @@
  */
 package org.apache.gravitino.catalog;
 
+import org.apache.gravitino.NameIdentifier;
+import org.apache.gravitino.Namespace;
+import org.apache.gravitino.dto.requests.SemanticModelCreateRequest;
+import org.apache.gravitino.semantic.OssieDocument;
+import org.apache.gravitino.semantic.OssieFormat;
+import org.apache.gravitino.semantic.OssieSemanticModelDocumentConverter;
+import org.apache.gravitino.semantic.SemanticModel;
 import org.apache.gravitino.semantic.SemanticModelCatalog;
 
 /** A dispatcher specialization for schema-scoped Semantic Model operations. */
-public interface SemanticModelDispatcher extends SemanticModelCatalog {}
+public interface SemanticModelDispatcher extends SemanticModelCatalog {
+
+  /**
+   * {@inheritDoc}
+   *
+   * <p>Delegates to this dispatcher's native create operation so that the 
document follows the same
+   * normalization and validation chain as a structured create request.
+   */
+  @Override
+  default SemanticModel importOssieSemanticModel(Namespace namespace, 
OssieDocument document) {
+    SemanticModelCreateRequest request =

Review Comment:
   My intention is to expose import/export as distinct `SemanticModelCatalog` 
operations, with their own hooks and events added in a follow-up PR. If the 
REST endpoints only call create/load, the dispatcher chain would see those 
underlying operations rather than import/export themselves. I'd prefer keeping 
the Core entry points for that reason.
   
   If we instead treat import/export as Server-only functionality, should we 
also reconsider the corresponding API definitions?



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