mchades commented on code in PR #13791:
URL: https://github.com/apache/gravitino/pull/13791#discussion_r4257055507
##########
core/src/main/java/org/apache/gravitino/catalog/SemanticModelDispatcher.java:
##########
@@ -26,30 +28,63 @@
import org.apache.gravitino.semantic.OssieFormat;
import org.apache.gravitino.semantic.SemanticModel;
import org.apache.gravitino.semantic.SemanticModelCatalog;
+import org.apache.gravitino.semantic.SemanticModelDefinition;
/** A dispatcher specialization for schema-scoped Semantic Model operations. */
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.
+ * <p>Uses the import pipeline without caller-specific source validation.
Server callers must use
+ * the overload accepting a source validator, even when authorization is
disabled.
*/
@Override
default SemanticModel importOssieDocument(Namespace namespace, OssieDocument
document) {
+ return importOssieDocument(namespace, document, definition -> {});
Review Comment:
`SemanticModelDispatcher` is now a standalone Core interface and no longer
exposes the two-argument import. Server callers must supply the validator; the
`api` module is unchanged.
##########
core/src/main/java/org/apache/gravitino/listener/SemanticModelEventDispatcher.java:
##########
@@ -131,6 +140,44 @@ public SemanticModel createSemanticModel(
}
}
+ @Override
+ public SemanticModel importOssieDocument(
Review Comment:
A direct parsed call previously emitted create events. It is now rejected by
the outer event dispatcher; callers must use `importOssieDocument` with source
validation. Parsed import and export require explicit implementations, and only
the operation dispatcher reuses create/load.
--
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]