yuqi1129 commented on code in PR #11036:
URL: https://github.com/apache/gravitino/pull/11036#discussion_r3231365541


##########
core/src/main/java/org/apache/gravitino/storage/relational/service/SchemaMetaService.java:
##########
@@ -162,18 +169,69 @@ public List<SchemaEntity> 
listSchemasByNamespace(Namespace namespace) {
   public void insertSchema(SchemaEntity schemaEntity, boolean overwrite) 
throws IOException {
     try {
       NameIdentifierUtil.checkSchema(schemaEntity.nameIdentifier());
-
-      SchemaPO.Builder builder = SchemaPO.builder();
-      fillSchemaPOBuilderParentEntityId(builder, schemaEntity.namespace());
+      // Callers above this service (e.g. JDBCBackend + naming bridge) pass 
storage-form schema
+      // names: nested paths use the internal physical separator, not the 
external logical one.
+      String physicalSep = HierarchicalSchemaUtil.physicalSeparator();
+      String schemaName = schemaEntity.name();
+      List<SchemaEntity> rowsToInsert = new ArrayList<>();
+      if (schemaName == null || !schemaName.contains(physicalSep)) {
+        rowsToInsert.add(schemaEntity);
+      } else {
+        String[] parts = schemaName.split(Pattern.quote(physicalSep), -1);

Review Comment:
   If possible, can you give a short example to demonstrate the logic here and 
L203. I have no more comments except this minor one. 



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